Hello experts! How to feed a segment with data from a foundry integration (Domino/Json). I'm just not able to do this.
Hi Rubens,
One of recognized features of HCL Volt MX is low-code. What this means is that you can develop an app that exchange data with Volt Foundry, for example a Foundry JSON-Integration service, using low-code approach. Specific to the scenario you mentioned, how to feed a Volt Foundry JSON-Integration service data to a Volt Iris project using the "segment" widget to display or list the rows of data, I will list the high level steps below:
1) Develop, test, and publish your Volt Foundry app that contains your JSON-Integration service. Let's say your Foundry App is named RubensFApp1. Let's also say your Integration service is named MyIntegration with an operation named "getAllRows", e.g. RubensFApp1 -> MyIntegration -> getAllRows.
2) Launch your Volt Iris IDE, open your Iris project, let's call it RubensApp. Click on "Design" at the top of the center canvas to enter the "design" view, not "storyboard" view. Create a new form in the channel you are targeting. *** Use the Volt Iris settings/preferences to point Volt Iris to the desired Volt Foundry. *** Use the Project Settings to make sure your Foundry is using the correct "environment".
3) At the top and far right of Volt Iris, note the Data & Services tab panel; click on it. Use the "hamburger" menu (to the right of the "Refresh" button to "associate" your Volt Iris project to your Foundry App, RubensFApp1.
4) After "association", note your Foundry services are available in the "tree" structure under the area "Volt Foundry Backend". Expand the tree until you see your Integration service and its operations, MyIntegration -> getAllRows.
5) Now DRAG the "getAllRows" operation to the center canvas which is showing the blank form you created above, and DROP the operation. You will be prompted to select the 3 UI display options, List & Details Using Response, Grid Using Response, or Details Using Response. Select the "Grid Using Response" for now. This drag-and-drop low-code method will create one form, UI/widgets, and most importantly the logic to get data from your Foundry service to be displayed in a SEGMENT. You can examine the form -> Properties -> Action -> onMapping event to see the low-code generated action-script which will enable your app to get your data from Foundry and insert them into your segment widget.
You can now adjust this form to your liking, or you can copy the logic and UI/widgets/layout to your own form for the same purpose, getting data from Volt Foundry Integration service to a Volt Iris Segment widget.
Hi Dai Nguyen, Thank you for your attention!. In fact, I had already found the cause of the problem! My json file was malformed. As it was an output from an HCL Domino agent, I preferred to change it to XML format, so it worked as expected.
To illustrate the problem follows:
JSON file that didn't work:
{
{"iddoc":"12345",
"name":"Nguyen"
},
{"iddoc":"12346",
"name":"Rubens"
}
}
XML file that worked perfectly:
<collection>
<doc id="12345">
<name>Nguyen</name>
</doc>
<doc id="12346">
<name>Rubens</name>
</doc>
</collection>