Show asset based on a variable value

ServNowDev
Tera Guru

I have a variable value name Trip Type, choices would be work or personal

I have a variable in a variable set named Select Asset that is referenced to the alm_asset table.

 

Depending on the Trip Type i was to show certian assets in that lookup table

so if Trip Type == Work , I want all asset from the Stockroom that are unassigned

but if the Trip Type is Personal , I want all the assets currently assigned to the user to show in the select box

 

is it possible to code out in the Reference Qual 

 
 

 

 

Thomas42_3-1710181135485.png

 

 

 

7 REPLIES 7

Right, so you have 2 types of 'trip' - work and personal.

If it's a work trip, show all the assets in the location stockroom.

If it's a personal trip, show only the assets assigned to the current user.

 

I think it would be best to write some code in a Script Include and invoke it within the Ref Qualifier

 

 

@James Chun trying to access the value of the variable to pass into my script include any ideas what im doing wrong, i want to pass in the ticket reference number from the catalog to query the one from the table. 

 

Thomas42_0-1710202015031.png

 

I am assuming the variable name is 'ticket_reference_number', if so, remove the 'item' in there.

i.e. current.variables.ticket_reference_number