Reference field on a custom table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 07:38 AM
Hello guesss,
I'm creating a reference field on a custom table and this field will populate dynamic data depending on another field value.
I'm trying to achieve this and I'm also getting dynamic dropdown values
However, I'm getting duplicates
I only want unique records.
How can I achieve this?
It's really simple to do on catalog variables since we have lookup select box but do we have just type on forms?
How can I removed duplicate values?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 08:22 AM
If your target table (e.g., u_budget_expense) contains multiple rows with the same value in the column you're referencing (e.g., project_code), then even though you're filtering correctly, the dropdown still shows multiple rows because each row is a separate record (with a different sys_id).
You can create a database view or a custom table that contains only distinct values.
Create a table (or view) with just unique project codes.
Populate it using a scheduled job or script that extracts unique values.
Point your reference field to that table instead.
This is clean and performant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 08:29 AM
How can I achieve this Nitesh?
You can create a database view or a custom table that contains only distinct values.
Create a table (or view) with just unique project codes.
Populate it using a scheduled job or script that extracts unique values.
Point your reference field to that table instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 10:11 AM
Based on your first sentence...Look at the definitions for 'assigned_to' and 'assignment_group' for task table. Once the assignment_group is filled in, the choices for assigned_to are limited the the specific group chosen.
field-administration MakingAFieldDependent
More details on what you have done are needed, for a form field, you can use a client script and script include (logic here can avoid duplicates).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 11:53 PM
Hi Bert,
Please provide me with the logic that you were talking about