- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2024 02:32 AM
Hi Community,
I have a requirement.
There are two fields on the change form:
- Location (referencing cmn_location, List type)
- 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?
- Is it possible through Data Lookup? If so, how?
- Do I need to write a script?
- 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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2024 03:27 AM
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2024 03:27 AM
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2024 04:45 AM
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.