Home › Forums › Classic DFFS › Rules Limitation?
- This topic has 3 replies, 2 voices, and was last updated 10 years ago by Alexander Bautz.
-
AuthorPosts
-
-
October 23, 2014 at 21:16 #6419
Is there an amount limitation to the rules that can be applied a form? I have created a list that is growing rather large as the users keep asking for more data to be displayed on it. The list format is several questions that have a Yes/No choice, and then a comments field for each question. They are asking for a rule to be in place for if the answer is No, the comments tab will be required. This would be in place for over a hundred fields, with each question requiring a separate Rule. Will this get too large and slow down the processing of the list?
- This topic was modified 10 years ago by Alexander Bautz. Reason: Moved to DFFS forum
-
October 23, 2014 at 23:20 #6420
There is not a definitive limit, but 100 rules will take its toll on the browser. I have not tried this myself though.
Your specific requirement would be better solved with a few lines of custom JS. This will require a list of the fields you want to apply this rule to, and a corresponding list of comment fields to make required.
I’ll try to whip up an example during the weekend.
Alexander
-
October 24, 2014 at 13:59 #6422
A SharePoint List of all the Yes/No columns and another list of all the corresponding Comments columns? Do they need to have matching ID values for each corresponding set of fields?
-
October 26, 2014 at 23:42 #6463
Hi,
Add this code to the Custom JS section in the Misc tab. Change the FieldInternalNames in the “arr” to match your field names:(function(){ var arr, chk; arr = [ {"trigger":"YesNoFieldNr1","comment":"YesNoFieldNr1_comment"}, {"trigger":"YesNoFieldNr2","comment":"YesNoFieldNr2_comment"}, {"trigger":"YesNoFieldNr3","comment":"YesNoFieldNr3_comment"} ]; $.each(arr,function(i,o){ // Click chk = $(spjs.dffs.fields[o.trigger]).find("input:checkbox"); chk.click(function(){ toggle_requiredByYesNo($(this),o) }); // Load toggle_requiredByYesNo(chk,o); }); })(); function toggle_requiredByYesNo(elm,o){ if(elm.prop("checked")){ spjs.dffs.flag_Mandatory([o.comment]); }else{ spjs.dffs.clear_Mandatory([o.comment]); } }
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.