Widget Help, passing multiple values to HTML

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 03:35 PM
Good Evening All,
I am writing a widget for our portal and I can't figure out what I've done wrong. I need to pass multiple values about a queried record(s) to the HTML.
As seen below I try to put the items I need in an array and then pass it to the HTML but I keep getting duplicates.
If I don't pass specific properties like unit.id and unit.comp then I get the first result repeated over and over.
Can anybody see what I've done wrong?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 04:25 PM
Hi there,
In your client script (controller), you could try logging the array contents to your browser console to further troubleshoot and see if it is an issue of properly generating the array, or an issue on the HTML side of displaying the data inside the array.
What do you see in your browser console if you add this line of code to your client script?
console.log('unitOpening arr is: ' + JSON.stringify(c.data.unitOpening));
If this answer is helpful please mark correct and helpful!
Regards,
Christopher Perry
Regards,
Chris Perry