Am doing some coding on JSlink to implement conditional formatting on SharePoint lists. We are using SharePoint 2013 online (office 365). The format of the given field(s) are changed based on other fields. The conditional formatting is working perfectly, when all the fields are shown on a list view. To make the list view pretty, I need to create new list view with fewer column, also I want to give the flexibility for the users to have other views if they wish.
Once I remove a fields from the list view, the value turned into 'undefined' which break all the fields formatting because they are related.(Make sense because am using client side rendering to do the conditional formatting).
Am using the following code to retrieve data of fields.
var planD = ctx.CurrentItem.InternalName1; var actualD = ctx.CurrentItem.InternalName2; // this field is not included on the new list view and returns undefined
Looking forward to get help