Display Values on a reference field depending on the choices selected in other field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2023 07:05 AM
Hi experts,
could you please help me on below requirement.
In a custom application form, we have two fields, one is drop down(sub_demand) and the other is reference field(core_logistic).
We have four choices in sub_demand field and the core_logistic field is reference to a XYZ table and in XYZ table we have a field "log type" which have same values as the choices in sub_demand.
so the requirement is, if I select choice "A" in the sub_demand, I want "core_logistic" should display only those values which have log type "A" and similarly for other choices "B" and "C".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2023 07:44 AM
It sounds like you want a reference qualifier like this:
Where log_type is the name of the field on the referenced table that has the same choices as the sub_demand values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2023 09:44 AM
Hi @Brad Bowman ,
I tried the script but its not returning any value.
Also, the field sub_demand and log_type have no relation. it just the values have same name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2023 10:48 AM
The best I can do is give you an example using out of the box tables and fields that sounds to me like it matches your example, then you can see where amongst your various custom tables and fields the scenario differs, then we should be able to see why this isn't working for you.
Let use the incident table as an example, and the Category field (named category, type of String, with Choices) and the Configuration item field (extended from the task table, named cmdb_ci, referencing the cmdb_ci table). Note that the Category and Configuration item fields are not at all related, nor are the incident/task table related to the cmdb_ci table.
I added to the out of box choices for Category a record with the Label = Computers, and the Value = cmdb_ci_computer.
I have changed the reference qualifier (Dictionary Override in this case) to:
So when I select the Category = Computers, the Configuration item field reference search will only show the records from the cmdb_ci table which have a value in the sys_class_name field = cmdb_ci_computer