make a field visible and mandatory if other field changes values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 06:08 AM
Hello,
I am trying to make the field "Reject reason" visible and mandatory to fill in in order to change the status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:54 PM - edited 01-05-2024 02:55 PM
@Kata ,
Something similar to this:
Source Scope and application will be your custom expense application.
Please mark helpful if this helped or accept the solution if it solved your query.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 06:16 AM - edited 01-05-2024 06:16 AM
on the ui action check this
if(g_form.getValue('reject_reason')=='')
g_form.setMandatory('reject_reason', true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 06:09 AM - edited 01-05-2024 06:10 AM
Hi,
You can create a ui policy to do so and in the ui policy action you can add the reject reason with the attributes as below.
Mandatory - true
read only - false
Visible - true
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 06:22 AM
Hi @hadron_collider ,
Do u already have the Reject Reason field available/created on that form/Table. If yes just add this script in your Reject UI action. Make sure client checkbox is checked.
g_form.setDisplay('reject_reason',true);//use proper backend name of the variable
g_form.setMandatory('reject_reason',true);//use proper backend name of the variable
If no then please create 1 new field & then follow the above step.
Thanks,
Danish