Need to update custom field when selection is made.
I have locations setup for our campus based on buildings and room numbers. All the room numbers are child locations of the parent building locations.
I'm working on updating our "New Employee" ticket and would like a way to populate the Room Number (custom field) based on the selection of the Building (custom field).
Both fields are auto-populated via a query.
The Building field select statement is: select NAME from ASSET Where ASSET_CLASS_ID='11012'
The Room Number field select statement is: SELECT A.NAME FROM ASSET A INNER JOIN ASSET_HIERARCHY H ON H.CHILD_ASSET_ID = A.ID WHERE H.PARENT_ASSET_ID = (Select A.ID FROM ASSET A Where A.Name='Admissions' AND A.ASSET_CLASS_ID=11012);
Both of these queries work fine.
What I would like to happen is when a selection is made from the Building field, the room field runs its query with the name selected from the Building field in place of 'Admissions' in the current statement.