when i create a billing application on iris. using foundry service on segment data is coming but i am using also buttons on segment but button is not visible on preview.
Hi Shishir,
My guess is that you are using the low-code action script in Iris to fetch and display data from Foundry into your segment.
If the above is true, the reason you are not seeing your button in the segment after calling Foundry service for data, is that the fetched data does not set the "text" property of the button in your segment. In the low-code action script, look at the generated Javascript code and you will see how the segment is using function "setData" to display the fetch data (top right of action script, Diagram View vs. Design View vs. Code View).
Here is an example of JS code setting the segment data, assuming your Foundry service is fetching "local news":
if (getLocalNews.opstatus == 0) {
var tempCollection6965 = [];
var tempData4012 = getLocalNews.channel;
for (var each1967 in tempData4012) {
tempCollection6965.push({
"lbltitle": {
"text": tempData4012[each1967]["title"]
},
"lbllink": {
"text": tempData4012[each1967]["link"]
},
"btnDoIt": {
"text": "Control"
}
});
}
self.view.seggetLocalNews.setData(tempCollection6965);
}
The low-code action script does not contain the 3 lines where button "btnDoIt" text property is set at first, and that button does NOT appear when the app is run. After I added the 3 lines to set the button btnDoIt text property, the button will appear in the segment along with fetched data.