- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 10:21 PM
Hi All,
I have requirement that for example
case 1 if the location in india i am receiving the 3 Values like A , B , C
Case if the location is America than we are receiving the 2 values like A and B.
For the above server script written in portal
var queue= new GlideRecord('wu_location_kiosk');
queue.addQuery('location_queue',queueId);
queue.query();
var ab=[];
while(queue.next())
{
ab.push(queue.name.toString());
}
from the ab value in array
based on the location values i need to create dynamically buttons
by using this script :
<span ng-repeat="buttonname in buttonarray" ><button ng-click="'{{buttonname}}'" {{buttonname}}</button></span>
Can you help me to build the HTML code to create buttons based on the values
Thanks,
Chandan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 07:02 AM - edited 11-14-2024 07:03 AM
html
<div>
<button ng-repeat="buttonname in data.buttonarray" ng-click="function call">{{buttonname}}</button>
<div>
Server script
data.buttonarray=[];
var queue= new GlideRecord('wu_location_kiosk');
queue.addQuery('location_queue',queueId);
queue.query();
while(queue.next())
{
data.buttonarray.push("<buttonname>");
}
Let me know if you need more help
Mark this helpful if it works for you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 07:02 AM - edited 11-14-2024 07:03 AM
html
<div>
<button ng-repeat="buttonname in data.buttonarray" ng-click="function call">{{buttonname}}</button>
<div>
Server script
data.buttonarray=[];
var queue= new GlideRecord('wu_location_kiosk');
queue.addQuery('location_queue',queueId);
queue.query();
while(queue.next())
{
data.buttonarray.push("<buttonname>");
}
Let me know if you need more help
Mark this helpful if it works for you