Auto Populate List Collector with devices assigned to user using Script Include and Catalog Client
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 11:28 AM
Catalog Client - onLoad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 08:55 PM
Hello @Khill
You cannot return Array from script include to client script
Instead you can convert this to string and pass to client script and then split in array.
Please check and Mark Correct and Helpful if it really helps you.
Regards,
Prashant Ahire
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 09:34 PM
Hello @Khill you can use JSON.stringify(deviceList) to convert the array to a string and JSON.parse on the client side to get back the value back
Hope this helps
--
Bala Guthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 05:01 AM
I added the JSON.stringify in the script include. I'm receiving a console error. "TypeError: Cannot read properties of undefined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 09:01 PM
Hi,
Please share which Ui you are using? Catalog form, Classic Form?
Is your name field have default value?
Have you tried adding alert/logs and logs to check what values you are passing and what your script sending from script include?
Thanks
Anil Lande
