A long-awaited feature made it earlier in Oracle Digital Assistant 21.10. Starting with Oracle Digital Assistant 21.10, the System.CommonResponse component has a new iteratorExpression property that enables the component to display values from arrays stored in a nested object as would be returned from a REST service call. This article explains how to work with this new feature.
The problem solved by the new iteratorExpression
The System.CommonResponse component in Oracle Digital Assistant can loop through arrays to print multiple message responses or dynamically generate action items based on the content in that array.
A limitation of this functionality in versions prior to Oracle Digital Assistant 21.10 was that the array had to be a top-level element of a variable. In other words, the iterator required a variable reference added to its iteratorVariable property, which often required developers to copy the content of a REST service result set into a variable before the contents could be displayed in a list. With the iteratorExpression property, this intermediate step is no longer required.
How to use the iteratorExpression
The sample code below creates an object with a property items holding an aarray for employee names and employee Id. The variable mocksup a result set returned from a REST call. Read the complete article here.
For regular information become a member in the Developer Partner Community please register here.