- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 05:40 AM
Hi,
My UI Action Button visible only based on the below conditions. that are,
UI Action Name : Submit
Condition : 1. State = Draft
2. User has "Admin" role
3. Assigned To User
I have created somehow, can anyone guide me to achieve this.
I attached the screenshot for reference.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 05:46 AM
Add below code in Condition field
(Modify field name for state in your form if needed)
current.state == 'draft' && (gs.hasRole('admin') || (current.assigned_to == gs.getUser()))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 05:58 AM
Hi @subashds6515,
- To apply the conditions for the 'Submit' button, add the below code line in the 'Condition' field.
current.state == 'draft' && ( gs.hasRole('admin') || current.assigned_to == gs.getUser() )
- So only when the above conditions are met, the button will be visible. And onClick of the button, the field's 'u_choice_4' value will be set to 'submitted' and the form will get saved which you have mentioned in the script.
If you feel that I have assisted you in any manner, please mark my comment as helpful/correct.
For more information, check out the below product documentation.
Thanks,
Shreya Wani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 06:15 AM
HEllo @subashds6515 ,
you can try this in condition
current.u_choice_4 == 'draft' && gs.hasRole('admin') && current.assigned_to == gs.getUserID()
Hope this helps
Mark my answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 05:46 AM
Add below code in Condition field
(Modify field name for state in your form if needed)
current.state == 'draft' && (gs.hasRole('admin') || (current.assigned_to == gs.getUser()))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 05:58 AM
Hi @subashds6515,
- To apply the conditions for the 'Submit' button, add the below code line in the 'Condition' field.
current.state == 'draft' && ( gs.hasRole('admin') || current.assigned_to == gs.getUser() )
- So only when the above conditions are met, the button will be visible. And onClick of the button, the field's 'u_choice_4' value will be set to 'submitted' and the form will get saved which you have mentioned in the script.
If you feel that I have assisted you in any manner, please mark my comment as helpful/correct.
For more information, check out the below product documentation.
Thanks,
Shreya Wani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 06:15 AM
HEllo @subashds6515 ,
you can try this in condition
current.u_choice_4 == 'draft' && gs.hasRole('admin') && current.assigned_to == gs.getUserID()
Hope this helps
Mark my answer correct if this helps you
Thanks