Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Update Related List Based on Choice Fields

TejasSN_LogicX
Tera Contributor

I have a form with three choice fields. When I select values in all three fields and click the “Search” button, the related list below the form should update based on those selected values.

How can I achieve this in ServiceNow?

4 REPLIES 4

PrashantLearnIT
Giga Sage

Hi @TejasSN_LogicX 

 

You can use UI Policy; such use case is explained in my video as well below: 

https://www.youtube.com/watch?v=C6iKsH6qarw

********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.

********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect


Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
For More Information, please check details below: My Playlists for Quick Access for Various Learning Paths: ServiceNow Zurich Release Features - https://www.youtube.com/playlist?list=PLmMLNh-9xqQFl-WQWRl_j2Nz1C3y8HCy_ ServiceNow Technical Podcasts - ...

OlaN
Giga Sage
Giga Sage

Hi,

Related lists can be configured to behave differently based on the data your enter in your record form.

But you would need to have the data saved on the form in order for it to happen, so a search button that doesn't save the current data will not work, if I understand your requirement correctly.

In one of our recent servicenowexpeditions we dive into the topic of creating a custom related list, which are dependent on data on the form.

Check it out and see if it helps you.

https://www.youtube.com/watch?v=tHhKdC0hx0U 

Ankur Bawiskar
Tera Patron
Tera Patron

@TejasSN_LogicX 

you can have logic within that Search button to update the related list records linked to this form.

what did you start with and where are you stuck?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Experts,
I have 5 Department fields on my form, and each field is dependent on the previous one. For example, when I select Department 1, the Department 2 field only shows departments under Department 1, and so on.

Sometimes I select only 1 department, sometimes 2 or 3, and sometimes all 5 levels. I have a UI Action button, and when I click it, I want to show the related list of Users.or update the  related list that belong to the last department level I selected.

Example:

  • If I select only Department 1 → show users from Department 1

  • If I select Department 1 → Department 2 → Department 3 → show users from Department 3

  • If I select all 5 levels → show users from Department 5

How can I get the last selected department value and display the related list of users based on that?

Thanks in advance!