My form uses an xml structure similar to the following:
<BOM>
<Cost />
<BOMLine>
<Cost />
<DesignQty />
<Component>
<Cost />
</Component>
</BOMLine>
<BOMLine>
<Cost />
<DesignQty />
<UnknownComponent>
<Cost />
</UnknownComponent>
</BOMLine>
</BOM>
Notice that the BOMLine/Component and BOMLine/UnknownComponent are part of a choice group.
I have tried to set the default value of the BOMLine/Cost element using the following xpath formula:
sum(parent::BOMLine//Cost[parent::Component or parent::UnknownComponent])
The resulting value for the BOMLine/Cost element is nothing. The only time a value is ever produced is if I hard code the default as a constant (e.g. "1").
I looked in the manifest.xsf and I see the <xsf:calculatedField> specifed correctly in the <xsf:calculations> element. It is set to update automatically. Also, an expression box using the same formula does produce the correct values. Why is the field not being updated?
Thanks,
Chris