Skip to Content

How to access iterating index in aggregation binding

Mar 04, 2017 at 08:36 PM


avatar image
Former Member

I am working on implementing Autocomplete feature for my form fields and all the suggestion items comes from a service in an array of string literals. Looks like suggestion item template requires a key so it can pull the value of the current item in aggregation.

<Input required="true"
       suggestionItems="{ path: 'Global>/names', templateShareable:false}">
        <core:Item text="{Global>Name}"/>
    </suggestionItems> </Input>

Right now, i am converting my model data structure from array of strings to array of objects with key as "Name". It works. But, it's a overhead as there are lot of form fields and data grows continuously.

Is there a way, i can refer the index number during aggregation and call something like

suggestionItems="{ path: 'Global>/names', templateShareable:false}">
        <core:Item text="{Global>$index}"/>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers