Reputation: 191
I have the following XML:
<Details Category="a">
<Code>1</Code>
<Quantity>46.8</Quantity>
</Details>
<Details Category="a">
<Code>4</Code>
<Quantity>50</Quantity>
</Details>
<Details Category="a">
<Code>7</Code>
<Quantity>20</Quantity>
</Details>
<Details Category="b">
<Code>8</Code>
<Quantity>12</Quantity>
</Details>
I would like to create 2 repeated grids, one per category
My binds are the following:
<xf:bind id="Details-bind" ref="Details" name="Details">
<xf:bind id="Category-bind" ref="Category" name="Category"/>
<xf:bind id="Code-bind" ref="Code" name="Code"/>
<xf:bind id="Quantity-bind" ref="Quantity" name="Quantity" />
</xf:bind>
and the first repeated grid:
<fr:grid id="First-grid" repeat="true" bind="Details-bind"
template="instance('Group1-template')"
min="0" >.....
How can I get in the "First-grid" only values where Category="a"? I have to use binds because I have various calculations.
Updated with the repeated grid template:
<xf:instance id="Group1-template" >
<Details>
<Code/>
<Quantity/>
</Details>
</xf:instance>
Upvotes: 0
Views: 135
Reputation: 31753
In your example First-grid
has bind="Details-bind"
, so on that bind, if you want it to list the elements with Category="a"
, you'll want to put:
<xf:bind id="Details-bind" ref="Details[@Category = 'a']" name="Details">
Upvotes: 1