JS Link Conditional Formatting Paging Not Working

I’ve added a list view webpart onto a SharePoint 2013 online page, this webpart has a JS Link to a file containing JavaScript which applies different CSS to the CurrentRiskImpactLikelihood column depending on it’s value.

The JavaScript i’ve used is below:

    (function () { var condFieldCtx = {}; condFieldCtx.Templates = {};   condFieldCtx.Templates.Fields = { "CurrentRiskImpactLikelihood": {"View": PriorityFormat1}, }; condFieldCtx.OnPostRender = [PriorityFormat1]; SPClientTemplates.TemplateManager.RegisterTemplateOverrides(condFieldCtx); })();   function PriorityFormat1(ctx){      var priorityValue = ctx.CurrentItem.CurrentRiskImpactLikelihood;      if(priorityValue == 'Very Low'){         return "<span><font style='padding:5px;color:black;background-color:yellow;display:block;'>"+ctx.CurrentItem.CurrentRiskImpactLikelihood+"</font></span>";         }     else if(priorityValue == 'Low'){         return "<span><font style='padding:5px;color:black;background-color:yellow;display:block;'>"+ctx.CurrentItem.CurrentRiskImpactLikelihood+"</font></span>";         }     else if(priorityValue == 'Medium'){         return "<span><font style='padding:5px;color:white;background-color:orange;display:block;'>"+ctx.CurrentItem.CurrentRiskImpactLikelihood+"</font></span>";         }     else if(priorityValue == 'High'){         return "<span><font style='padding:5px;color:white;background-color:red;display:block;'>"+ctx.CurrentItem.CurrentRiskImpactLikelihood+"</font></span>";         }     else if(priorityValue == 'Very High'){         return "<span><font style='padding:5px;color:white;background-color:red;display:block;'>"+ctx.CurrentItem.CurrentRiskImpactLikelihood+"</font></span>";         }     else{         return ctx.CurrentItem.CurrentRiskImpactLikelihood;         } } 

This works fine on page 1 of the values I return, it doesn’t matter what the item limit of the pages in the view are, as soon as I go to the next page I get the following error:

TypeError: Cannot read property 'CurrentRiskImpactLikelihood' of null 

Does anyone have any ideas on a fix for this? I’ve tried googling it but had no luck so far!

perform multiple conditional join on multiple tables

I have a situation where I need to get result based on conditional joins

For example,

    SELECT        CGI.SALES_BRAND_BSNSS_ID,       CGI.SALES_BRAND_CD,       NVL(MTRX. matrix_score_cd,'RV1') MATRIX_SCORE_CD,       MDL.CORP_GROUP_ID,       MDL.MKTBRIDGE_RUN MKTBRIDGE_RUN_CD,       MDL.MKTBRIDGE_GROW MKTBRIDGE_GROW_CD,       MDL.MACRO_SEG MACRO_SEG_CD FROM         BIRTAB.CGI_ACTIVE_CUST_SEG_V MDL INNER JOIN        BIRTAB.SBBID_CGI_HIST_XREF CGI ON        MDL.CORP_GROUP_ID = CGI.CORP_GROUP_ID LEFT JOIN        BIRTAB.CUST_SEG_SCORE_MATRIX MTRX ON  -- if below two join conditions matches then it need to go to 3rd join condition else ignore all joins,               NVL(trim(MDL.ECHECK_DECILE_CD),'%') = trim(MTRX. ECHECK_DECILE_CD) AND               NVL(trim(MDL.MACRO_SEG),'%') = trim(MTRX.MACRO_SEGMENT_CD)  AND   -- if the above two joins matches and below join doesn't matches then ignore below two joins and get result based on above 2 joins               NVL(trim(MDL.MKTBRIDGE_RUN),'%') = trim(MTRX.MKT_BRIDGE_RUN_CD) AND  -- if the above three joins matches and below join doesn't matches then ignore below join and get result based on above 3 joins                           NVL(trim(MDL.MKTBRIDGE_GROW),'%') = trim(MTRX.MKT_BRIDGE_GROW_CD) 

Can anyone suggest some ideas to perform this logic.

Ty

conditional distribution multivariate gaussian generalized inverse

given $$\begin{bmatrix}X\Y\end{bmatrix}\sim N\left(\begin{bmatrix}\mu_X\\mu_Y\end{bmatrix};\begin{bmatrix}\Sigma_{XX}&\Sigma_{XY}\\Sigma_{YX}&\Sigma_{YY}\end{bmatrix}\right)$$ How can I prove that $$\Sigma_{YX}-\Sigma_{YX}\Sigma_{XX}^{-}\Sigma_{XX}=0$$, where $$\Sigma_{XX}^{-}$$ is the reflexive g-inverse, i.e. $$\Sigma_{XX}\Sigma_{XX}^{-}\Sigma_{XX}=\Sigma_{XX}$$.

The bigger picture is that I am trying to find en expression for the conditional distribution $$Y|X=x$$ when $$\Sigma_{XX}$$ is singular. My approach is to prove that $$X$$ and $$Y-\Sigma_{YX}\Sigma_{XX}^{-}X$$ are independent. Once this is proved the rest is trivial. However, I got stuck with the problem above.

Conditional formatting rules not applying the same in all ranges w/same rules

Excel 2016. I have the same six rules applied to seven separate columns. The formula and range is EXACTLY the same for each column (column letters changed, of course). The conditional formatting rules are: (Column D example) Top 1 =$d7=LARGE($ d:$d,2) =$ d7=LARGE($d:$ d,3) =$d7=SMALL($ d:$d,3) =$ d7=SMALL($d:$ d,2) Bottom 1

All cell data are non-formulaic numbers save last column (rules apply correctly there). Some columns have all rules applied correctly, some do not have the “Small or Large 2” rule applied. I have 11 rows of exclusive data now, so there should not be an issue with insufficient variables. What could I be missing? THANK YOU.

Can I use conditional formatting to highlight a cell for dates less than 30 days away?

I have a large spreadsheet where I need to keep track of coming expiration dates and I would like dates which are within 30 days from today’s date OR which have already passed to be highlighted in red. However, all of the stuff I have found online so far results in the entire column getting highlighted or not no matter what I do.

What would the formula be for it to highlight both dates which have passed already AND dates within the next 30 days?

conditional transformation

Is there a more correct way to transform an array based on a condition rather than just looping through it?

def f(x_array):     for x in x_array:         if np.abs(x) <= 3:             yield 1 - x/3         else:             yield 0 

I would like to write something like this:

def f(x):         if np.abs(x) <= 3:             yield 1 - x/3         else:             yield 0 

that could take an array.

Google Sheets: Conditional Formatting – Custom Formula – Text Contains

Okay, so I have dates in column B that include weekdays in the following format: DDD, MMM DD, YYY (For example, Sat, Jan 19, 2019).

I want each row to auto format to a specific background colour based on the weekday in column B.

So, if B1 contains “Sat” I want row 1 to turn blue. If B100 contains “Sat” I want row 100 to turn blue.

I have tried using suggestions from these threads like regexmatch: Conditional formatting based on portion of text

or countif: https://stackoverflow.com/questions/27723102/finding-partial-texts-in-conditional-formatting-custom-formula-is

But neither of these seem to work for me.

I am at a loss. Any help is appreciated.

Conditional expectation with respect to a sigma algebra

As part of a more complex problem I have this passage: $$E(X_{n+1}-X_{n}|F_{n})=E(X_{n+1}-X_{n})$$ where $$X_{n}$$ is a random variable defined as $$X_n(w)= \begin{cases} 0 \quad \frac{1}{n} < w \leq 1 \ n-n^2w \quad 0 \leq w \leq \frac{1}{n} \end{cases}$$ and $$F_n=\sigma(X_{1},…,X_{n})$$ is the sigma algebra generated by $$X_{1},…,X_{n}$$

Now I understand intuitively why this is true but is it possible to prove it in a rigorous way? I know that I can use the law of iterated expectation to get away with it but I want to understand why $$X_{n+1}-X_{n}$$ is independent from $$F_{n}$$.

Coding practices related to logic within function calls and conditional statements

I recently started working as a programmer and I am currently going through some codes (in C#) written by my colleagues. I have noticed that they tend to include logic within function calls within some conditional statements. For example:

if (MoveSpace(currentPos, distance * time)) { doSomething } 

They would also include logic when determining array positions. For example:

Space currentSpace = array[a*b, x*y] 

Is this a good/bad practice? Would it be better if I create a new variable for these logic results and pass in the variable instead? Thank you.

Conditional Formatting within SQL Query

In need your help with respect to following query.

I have of BOM (Bill of Material Table) in which Selling Price is calculated by the system for almost all the items except few. For those items whose S.P. is not calculated by the system I have used the formula (Pur. Price * Margin Factor) to calculate the Selling Price.

Total BOM Selling Price is calculated by totaling the Selling Price at the bottom of the column. I have already designed the query for subtotaling of the selling price column at the bottom of it. The only problem is the cell in which selling price is null I need to take from Calculated Selling Price column and I need to highlight the cell color in yellow so that I should know by looking a the cell that it is taken from calculated Selling Price

CREATE TABLE BOMPrice ( Parent_Item VARCHAR(4) NOT NULL PRIMARY KEY ,Child_Item VARCHAR(2) NOT NULL ,Selling_Price_Rs INT ,Pur_Price_Euro INT NOT NULL ,Margin_Factor INT NOT NULL ,Calc_Selling_Price_Rs INT NOT NULL );

INSERT INTO BOMPrice ( Parent_Item ,Child_Item ,Selling_Price_Rs ,Pur_Price_Euro ,Margin_Factor ,Calc_Selling_Price_Rs ) VALUES ( ‘ABCD’ ,’A’ ,5 ,2 ,3 ,6 );

INSERT INTO BOMPrice ( Parent_Item ,Child_Item ,Selling_Price_Rs ,Pur_Price_Euro ,Margin_Factor ,Calc_Selling_Price_Rs ) VALUES ( ‘ABCD’ ,’B’ ,2 ,1 ,3 ,3 );

INSERT INTO BOMPrice ( Parent_Item ,Child_Item ,Selling_Price_Rs ,Pur_Price_Euro ,Margin_Factor ,Calc_Selling_Price_Rs ) VALUES ( ‘ABCD’ ,’C’ ,NULL ,3 ,3 ,9 );

INSERT INTO BOMPrice ( Parent_Item ,Child_Item ,Selling_Price_Rs ,Pur_Price_Euro ,Margin_Factor ,Calc_Selling_Price_Rs ) VALUES ( ‘ABCD’ ,’D’ ,13 ,5 ,3 ,15 );

When the Selling Price (Rs.) = Null then Selling Price (Rs.) = Pur. Price (Euro)*Margin Factor (with cell background color to be yellow) else Selling Price (Rs.)

Desired Output

enter image description here