Auto set technical assessor values based on location on change form.

Varsha A
Tera Contributor

Hi Community,

I have a requirement.

There are two fields on the change form:

  1. Location (referencing cmn_location, List type)
  2. Technical Assessor (referencing sys_user, List type)

On the Location table, there is a reference field for Technical Assessor, which also points to the User table (List type).

Each location can have one or more technical assessors (stored on the Location table). For example:

  • London - Technical Assessor: "abc xyz" or "abc abc"..etc

I would like the Technical Assessor field to auto-populate on change form, based on the selected location(s). There could be multiple locations selected.

How can I achieve this?

  1. Is it possible through Data Lookup? If so, how?
  2. Do I need to write a script?
  3. BR could be a solution?

Additionally, if there is already a technical assessor listed, it should remain, and any new technical assessors should be added based on the selected location(s).

 

I would like to go with best solution,

 

Please help with detailed guidance.

1 ACCEPTED SOLUTION

Abhay Kumar1
Giga Sage

@Varsha A Data Lookup Definitions are used to auto-populate fields based on predefined mappings. However, Data Lookup does not work well with list-type fields (multi-select). It is better suited for single-value lookups.

Since you are using a List type for both Location and Technical Assessor, Data Lookup won't directly support this.

A Client Script can dynamically fetch and update the Technical Assessor list based on the selected Location(s) without requiring a page reload.

 

This is a better solution if you want real-time updates when users change the Location field.

You can create an onChange Client Script on the Location field to fetch and populate the Technical Assessor field.

Yes, a Business Rule can also be used to set the Technical Assessor field when the record is saved. However, this will not provide a real-time experience since the field is only updated after the form is submitted.

So best suggestion would be on-change client script for the same.

 

View solution in original post

2 REPLIES 2

Abhay Kumar1
Giga Sage

@Varsha A Data Lookup Definitions are used to auto-populate fields based on predefined mappings. However, Data Lookup does not work well with list-type fields (multi-select). It is better suited for single-value lookups.

Since you are using a List type for both Location and Technical Assessor, Data Lookup won't directly support this.

A Client Script can dynamically fetch and update the Technical Assessor list based on the selected Location(s) without requiring a page reload.

 

This is a better solution if you want real-time updates when users change the Location field.

You can create an onChange Client Script on the Location field to fetch and populate the Technical Assessor field.

Yes, a Business Rule can also be used to set the Technical Assessor field when the record is saved. However, this will not provide a real-time experience since the field is only updated after the form is submitted.

So best suggestion would be on-change client script for the same.

 

Thank you @Abhay Kumar1 for your reply; it makes sense to me. I’ll get back to you with the script. I am facing one issue with this approach, but I’ll try to resolve it first and then follow up here. Thank you.