We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

update field based on two reference fields

Not applicable

 

Hi Experts,

 

I need to update a choice field based on two other reference fields on a HR case form.

 

What is the best approach for this

 

TIA

1 REPLY 1

Anand Kumar P
Tera Patron

Hi @Community Alums ,

 

You can achieve this by creating an onChange Client Script on the second reference field. Use the g_form.getValue() method to retrieve the sys_id of both reference fields, or use the g_form.getDisplayValue() method if display values are needed. Implement an if condition to check if the values of both reference fields match the desired criteria, and use g_form.setValue() to update the choice field accordingly.

 

 

If my response helped, please mark it as the accepted solution and give a thumbs up👍.
Thanks,
Anand