Expand my Community achievements bar.

How to bind a non repeatable form on a specific record (XML datasource)

Avatar

Level 1

Hi,

Is it possible to bind a non-repeatable form on a specific 'record' of an XML datasource ?

If my subform is non repeatable, I only see in my fields the values of the first match for my binding.

At design time, I can specify $.myXmlDataCollection[n] ('n' being the index of an occurence of myXmlDataCollection) instead of $.myXmlDataCollection[*], but at runtime I don't know how to specify this index in my binding.

3 Replies

Avatar

Former Community Member

Binding is NOT dynamic so you cannot change the binding expression at runtime. If the record you want will be the same each time then you can modify the binding expression to pint to that specific record. If the record required changes, I would not have any binding but take care of retrieving the record you want from the Dom and setting the values yourself (through script of course).

Paul

Avatar

Level 1

Well, there is that for DB connections, so I was hoping for something similar for an XML datasource...

Thanks;

Avatar

Former Community Member

Nope ...a db or web service connection is meant to augment the data that is imported/exported. If you got the xml file from a web service call then that could be the case (but it still will not work that way).  The xml file is the entire data file that is loaded in teh data dom and will be imported/exported when required.

Paul