- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2024 12:23 AM
Hi All,
we have two fields (1. Location--->select Box with three values 105 West,33 NYA & Mission Bay)
2. Seating Assignment (Reference Field from custom table(u_seating).
my requirement is, based on select box value, reference field values should be populated)
ex: if i select 105West from select box, reference field should display 1, 2 & 3 only
if i select 33 NYA from select box, reference field should display 11, 12 & 13 only
if i select 105West from select box, reference field should display 21, 2 2& 23 only
attached the screen shot for fields & table structure,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 02:56 AM
@Sateesh11 Your location variable on the catalog item should be of type reference field instead of select box. Once updated the location would be filtered correctly.
Also, I am assuming the u_location field on u_seating is a reference field and refers to cmn_location table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 02:56 AM
@Sateesh11 Your location variable on the catalog item should be of type reference field instead of select box. Once updated the location would be filtered correctly.
Also, I am assuming the u_location field on u_seating is a reference field and refers to cmn_location table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2024 06:09 AM
Hi Sandeep,
it is working fine as expected.
i have another question about this requirement, based on location seatings are visible as expected.
1. selected location as 105west from location field-->i can be able to see and select 105west seats
2.selected location as 33 NYA from location field-->i can be able to see 33NYA Seats, but after selecting nothing has come under seating reference field.
FYI: 105West seats filed is display true in the table(u_seating).
any suggestions?
attached screenshot for your quick reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 03:45 AM
reference qualifier on seating arrangement field
new scriptInclude().checkData(current.u_location);
Script include :
checkData: function(location)
{
var locationID= location;
var gr=new GlideRecord("u_seating");
gr.addQuery("u_location",locationID);
gr.query();
var arr=[];
while(gr.next())
{
arr.push( gr.sys_id.toString());
}
return 'sys_idIN'+arr.join(',');
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2024 03:54 AM
@Sateesh11 have you tried above script with correct fieldnames...
Please accept solution if it is helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2024 06:18 AM
Hi Mani,
Thanks for your solution, but it is displaying all values, irrespective of location selection.