What would the JS be for a snippet used to conditionally render a field by comparing 2 other fields to see if they are equal? In other words, I want to highlight a row in a table if 2 field editor fields are not equal…
Page 1 / 1
I’m trying to answer 2 of your questions at once… But basically you can run an Inline snippet on page load with something like this (which also compares fields…):
(function(skuid){ var $ = skuid.$;<br>$(function(){<br> //this runs on page load <br> var firstModel = skuid.$M('FirstModel');<br> var firstRow = firstBG.getFirstRow();<br> var secondModel = skuid.$M('SecondModel');<br> var fieldOne = firstRow.field_One__c;<br>var fieldTwo = secondRow.field_Two__c;<br> if(fieldOne !== fieldTwo){<br>//do stuff here<br> secondModel.updateRow(secondRow,'Your_Field__c',yourNewValue);<br> }<br>});<br>})(skuid);
nice… thanks Moshe!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.