How can I create a new error message using this Cff plugin. I want to create like sum of three field number always up to 100% if it’s not then its shown some warning message
Hello @arnab28
If you have three fields: fieldname1, fieldname2, and fieldname3, and you want to display its sum if it is equal to 100 or a message if not, the equation would be similar to:
(function(){
var result = fieldname1+fieldname2+fieldname3;
return IF(result == 100, result, 'Warning: the sum must be 100');
})()
Best regards.
Hello sir,
Thanks for your help. Can I write this function code in HTML content under script tag or some other place?
Hello @arnab28
I sent you the code of an equation and the equations must entered through the “Set Equation” attribute in the settings of calculated fields.
Best regards.
I want to use this function in the number format (Percent) field. there is No “Set Equation” attribute option are there
Hello @arnab28
The validation rules affect only one field. If you want to generate validation rules that check the values of multiple fields as a group, you must implement it by yourself. An alternative would be to insert a calculated field in the form as an auxiliary to define a dependency to show a text or not.
For example, if you insert an “Instruct. Text” field in the form with the warning message, and a calculated with the equation: fieldname1+fieldname2+fieldname3
You can define a dependency through the settings of the calculated field as follows: if the value is not equal to 100, and select the Instruct. Text field inserted previously from the list of dependent fields.
More information about dependencies by reading the following post in the plugin’s blog:
https://cff.dwbooster.com/blog/2020/03/01/dependencies/
Best regards.