G
Greg S
Scenario: I have 2 repeating groups. One serves as a lookup table, the
other represents a table of new items.
ex.
lookups
products
@id
@name
@flagged (can be 0 or 1)
orders
order
orderItems
@qty
@productId
@special
Given that structure, I want a rule to fire so when a the @special attribute
is changed, I capture the @productId, then go back and find the matching
lookups/products/@id and set it to 1. Right now the generic rule can only
set all lookup/products/@flagged fields to 1. I tried manually editing the
xpath in the manifest.xsf to add a 'where clause' on the
xsf:assignmentAction targetField xpath as follows:
the generic rule:
../../lookups/products/@flagged
my change to manifest
../../lookups/products/[@id = current()/@productId]/@flagged
But I get an error when the rule fires that current() is an invalid
function.
As a test, I also used a hard-coded value
../../lookups/products/[@id = 7]/@flagged
and this worked fine.
Is there a solution to this?
other represents a table of new items.
ex.
lookups
products
@id
@name
@flagged (can be 0 or 1)
orders
order
orderItems
@qty
@productId
@special
Given that structure, I want a rule to fire so when a the @special attribute
is changed, I capture the @productId, then go back and find the matching
lookups/products/@id and set it to 1. Right now the generic rule can only
set all lookup/products/@flagged fields to 1. I tried manually editing the
xpath in the manifest.xsf to add a 'where clause' on the
xsf:assignmentAction targetField xpath as follows:
the generic rule:
../../lookups/products/@flagged
my change to manifest
../../lookups/products/[@id = current()/@productId]/@flagged
But I get an error when the rule fires that current() is an invalid
function.
As a test, I also used a hard-coded value
../../lookups/products/[@id = 7]/@flagged
and this worked fine.
Is there a solution to this?