This is my simple list:
...and this is my script:
I want to trigger row highlighting for all items where Value1 == "1" (Value1 column is type Single line of text)
Your wisdom is greatly appreciated.
Solved! Go to Solution.
you have two issues there:
- on lines 5 & 7 you have to use square brackets instead of curly ones
- on line 15 you have to call "length" instead of "Length" (ie. small letter instead of capital one)
Marian, thanks much for your response. I implemented the changes you identified, but unfortunately I still don't get the desired result: no highlights at all. On the same site, I have gotten other JSLink customization to work without issues, so I agree with you that it must be an error in this script somewhere. I also realize that this question has nothing to do with Nintex per se: it just came up during a Nintex workflow project. Thanks all the more for responding. Were you able to get this working yourself? And do you have any other suggestions? Kind regards, Robert.
yes, I have tested your script on my test list and it worked fine with suggested changes.
(I have set it to highlight for Valid = Yes)
just some thoughts
- have you checked developer console whether there are not reported any errors?
- have you tried to debug/step through your code whether it behaves as you expect?
- check whether you store and reference the script on the same path (search in developer console for script nama, it should appear among js includes; check the script path is correct)
- proof check you correctly reference your conditional column name, do not mix up column display and real name
Marian, thanks again for the time and effort. Meanwhile, I have solved the problem. The script errors you identified were certainly part of it, so thanks much for that. The other half was that the column Value1 that the script refers to turned out not to have Value1 as its internal name. When I created my test list, I went into Quick edit mode and quickly added columns by clicking on the + sign. When I inserted debug messages into the script, I found that the reference was 'undefined'. So, I deleted my columns and recreated them, this time using the official Create column option in the list setting. And boom, it started working.