- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017 01:33 AM
Hi Team,
We have check box field on form if check box is checked need to hide button without saving the form and if check box is unchecked need to show the button on form without using DOM .Any one Can help me..
Thanks
Elanraj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017 02:32 AM
Hi Elanraja,
1) Create a UI Policy --> Set Condition as field (check_box) is true
2) In the Script tab set Run scripts true
3) In the if condition write
$$('#action_name')[0].hide(); //This will hide the top button
$$('#action_name')[1].hide(); //This will hide the bottom button as well
4) In the else condition write
$$('#action_name')[0].show(); //This will show the top button
$$('#action_name')[1].show(); //This will show the bottom button as well
For reference,
check this How to hide/show an UI action on field changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017 01:42 AM
Hi Elanraja,
Can you mention the exact requirement?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017 02:32 AM
Hi Elanraja,
1) Create a UI Policy --> Set Condition as field (check_box) is true
2) In the Script tab set Run scripts true
3) In the if condition write
$$('#action_name')[0].hide(); //This will hide the top button
$$('#action_name')[1].hide(); //This will hide the bottom button as well
4) In the else condition write
$$('#action_name')[0].show(); //This will show the top button
$$('#action_name')[1].show(); //This will show the bottom button as well
For reference,
check this How to hide/show an UI action on field changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017 04:54 AM
Thanks Nitish,
Its working fine . but hiding bottom button need to use 2 in Helsinki version like below
$$('#action_name')[2].hide(); //This will hide the bottom button for Helsinki
Thanks
Elanraja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017 09:27 AM
Hi Elanraja,
Its working fine in my Helsinki version.
If that answers your query, will you please mark my answer correct and close the thread.