Reference qualifier is showing only one value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 05:28 AM
Hello,
I am calling script include in reference qualifier and i am getting only one value, instead of showing related values.
script include i am using:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 06:11 AM
You are returning a list of sys_ids from the u_rm_management table, so the reference field table must be the same table. Otherwise, you need to change your script include logic to return a list of sys_ids from the 'different' table based on records from the data management table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 06:16 AM
The table from which i am trying to get sys_ids and the App Platform field table is same. when i tried with same script include its showing correct value only but returning only one value. i tried the same script in background script, there i am getting all values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 06:20 AM
You'll need to add some logs to your Script Include to see what is happening. Start with 'app' as that's one difference between this script and what you would have run in the background script. Also log the sys_ids or the Name or something meaningful that is pushed to the result, so you can confirm these are expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 06:31 AM
I tried writing logs at different levels, when i placed return in while loop, i am getting the sys_id(only one). and when i tried writing return outside of loop its only taking sys_id of cmdb while loading means On Load. I want it for on Change. when any value changed in cmdb_ci, related app platform values should be shown in reference qualifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 06:37 AM
If your 'app' script variable is not logging correct in all test cases, try passing it in from the reference qualifier instead
javascript: new appapplication().platform(current.cmdb_ci);
Then change the function declaration to
platform: function(app) {
and remove the var app line