Binding W/ double xml tag different Scheme ID's

Avatar

Avatar

tarad4225910

Avatar

tarad4225910

tarad4225910

21-08-2019

I am having a binding issue where i want to display the StandarID if the item the binding i see available is

$.PurchaseOrder.Item[*].Product.StandardID[*]

However there are two StanardID's in the xml data but with different schemeAgencyID. this is causing it to display twice. Code Snippet below:

<Product>

        <StandardID schemeAgencyID=" ">614099645358</StandardID>

        <StandardID schemeAgencyID="9">614099645358</StandardID>

        <BuyerID>DA1270-CSB</BuyerID>

        <BillToID>DA1270-CSB</BillToID>

        <TypeCode>1</TypeCode>

        <TypeName languageCode="EN">Material</TypeName>

      </Product>

Is there a way in the binding or js to use this one <StandardID schemeAgencyID="9">?

thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

21-08-2019

You can use predicates in your data binding expressions to filter results.

See here: http://blogs.adobe.com/formfeed/2008/10/data_binding_with_predicates.html

In your case it should be something like $.StandardID.[schemeAgencyID == "9"].

Answers (0)