- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 07:17 AM
We are redoing one of our Service Catalog items for Cell phone upgrade requests, right now when the user opens the form we prepopulate the Users name, but then ask them to fill in the information for
Current Phone
Phone Number
Serial Number
These are all pieces of informations stored in the Peripheral table, so we want to prepopulate it for them
Right now I have it set like this (just testing to get 1, then the rest should work..)
Variable 1 Reference to sys_user table - User (user)
Variable 2 Lookup Select Box - looking up the cmdb_ci_peripheral
I have this set to only show devices assigned to the user with the following
javascript: 'assigned_to='+current.variables.user
This works, but shows ALL peripherals. I want to limit the box to show JUST the Mobile devices, which is Type - Mobile Device. If I look this up in the peripheral table, Mobile Device shows as sequence 5
What do I need to change on the javascript to filter down to the mobile only or is there a better way?
I tried
javascript: 'assigned_to='+current.variables.user+'^type'=5 or mobile_device and neither worked.
Once I have that, I should be able to script in the retrieval of the serial number, phone number etc
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 07:41 AM
@Brian Sorensen Please update your reference qualifier as follows.
javascript:'assigned_to='+current.variables.user+'^type=mobile device';
The difference: In your reference qualifier you are using quotes ('') incorrectly to filter type in your qualifier.
Also, if your Mobile Devices internal value contains _ e.g. mobile_device then the qualifier would get updated as follows.
javascript:'assigned_to='+current.variables.user+'^type=mobile_device';
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 07:26 AM
The better way is that you can write a script include and call the script include in the reference Qualifer.
Thanks and Regards
Sai Venkatesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 07:41 AM
@Brian Sorensen Please update your reference qualifier as follows.
javascript:'assigned_to='+current.variables.user+'^type=mobile device';
The difference: In your reference qualifier you are using quotes ('') incorrectly to filter type in your qualifier.
Also, if your Mobile Devices internal value contains _ e.g. mobile_device then the qualifier would get updated as follows.
javascript:'assigned_to='+current.variables.user+'^type=mobile_device';
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 08:14 AM
Thank you!! really appreciate it. I had a feeling it had the quote in the wrong spot and was losing my mind