changes the State from 'Draft' to 'Ready' all the fields in the form should become mandatory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-09-2022 01:05 AM
i am created a form in one table with several fields. the requirement is
- As user changes the State from 'Draft' to 'Ready' all the fields in the form should become mandatory
- There should be a Note/Tooltip for the user when the change the state from Draft to Ready, to notify them that all the fields are mandatory.
can any one help me in this case......

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-09-2022 01:08 AM
You can create a UI policy to handle this
Condition : state is ready
Add UI policy actions for the fields and set Mandatory as true
Also add in run script:
g_form.addInfoMessage("Fields are mandatory")
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-09-2022 01:17 AM
You can write an UI policy or an OnChange Client script.
If UI Policy :
Set condition as state is 'Ready'
In Script tab in 'Execute if True' :
g_form.addInfoMessage("All fields are mandatory in Ready state");
In Execute if false :
g_form.clearMessages();
In UI Policy actions set all required fields mandatory.
If with client script :
Type : OnChange
Field : state
script:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
if(newValue == 'ready')
{
var fields = g_form.getEditableFields();
for(i=0; i<fields.length; i++){
g_form.setMandatory(fields[i],true);
}
}
}
Mark as correct or helpful as applicable.
Regards,
Sumanth