- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 01:35 AM
As per subject, I have a catalog form where one of the variable is named - Owner where it will return the name of the employee that owns the device, and this variable references the sys_user table.
So let's say if i were to run a report based on the Catalog form and i wanted to know the employees' job title, how do I do it via dot walking from the "Owner" variable to the sys_user.title field?
I tried and it seems the most I can go further is until the variable and nothing else, is there a way to do some scripting to get the required field value in the Report?
Thanks a lot !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 02:35 AM
Hi!
I can see where the issue lies, and there is a simple workaround.
I created a variable set, one with the 'Owner | owner_v2' variable and another named 'owner_title'
On the Catalogue Item, I created a Client script as follows:
function onChange() { //When the user updates the Owner field, we pull the title through var user = g_form.getReference("owner_v2", populateUserInfo); } function populateUserInfo(user) { if (user) { g_form.setValue("owner_title", user.title); } }
You can then hide this variable or display as read only on the catalogue item. This can then be reported on
I reported on the sc_req_item table rather than the sc_task table.
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 02:35 AM
Hi!
I can see where the issue lies, and there is a simple workaround.
I created a variable set, one with the 'Owner | owner_v2' variable and another named 'owner_title'
On the Catalogue Item, I created a Client script as follows:
function onChange() { //When the user updates the Owner field, we pull the title through var user = g_form.getReference("owner_v2", populateUserInfo); } function populateUserInfo(user) { if (user) { g_form.setValue("owner_title", user.title); } }
You can then hide this variable or display as read only on the catalogue item. This can then be reported on
I reported on the sc_req_item table rather than the sc_task table.
Hope this helps!