How to know if related list is not empty and automatically update the field on the parent form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 11:34 PM
Hi!
We have a requirement where we want to query the related list in Table_1 and if there' at least one record in Related_List_1, the Select Box field value will be changed in Table_1 form
Sample Details:
table_1 = is the current form
relate_list_1 = is the related list on the Table_1
Type = is the select box field (Choices: One , Two)
Scenario:
If the related_list_1 has at least 1 record in table_1 form, the Select box = 'One'
Thank you in Advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 12:28 AM
Hi @Gunjan Kiratkar thanks for this
Added the script you provided, however
The vtb_task form with record in Related List , the Service Task field = No
The vtb_task form without record in Related List, the Service Task field = None (it should be yes)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 01:03 AM
Hi @ss123 ,
Can you go to the dictionary of that field and provide me the backend values?
I just wanted to confirm weather the values are correct or not.
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 04:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 10:01 PM
Please see attached screen shot in the above comments. The column name is u_choice_2