The CreatorCon Call for Content is officially open! Get started here.

How to know if related list is not empty and automatically update the field on the parent form

ss123
Tera Contributor

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!

13 REPLIES 13

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) 

 

 

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

Hi @Gunjan Kiratkar 

 

See below screen shots. Thanks.

 

SabrinaSalazar_0-1668646172982.pngSabrinaSalazar_1-1668646188860.png

 

 

ss123
Tera Contributor

Hi @Gunjan Kiratkar 

Please see attached screen shot in the above comments. The column name is u_choice_2