Hi Hilary,
Thanks for the repsonse. I was actually making some progress with another approach that you suggested in a previous blog which involved a formula in the default value which handled conditional IF logic:
The approach is described in the the following website: http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx
I can successfully select the correct column if it were based on one logic condition, for example
concat(
substring(xdXDocument:GetDOM("ProductItemsData")/ProductItems/ProductItem/PriceMinTwelveWeeks[../ProductItemDesc = current()/../my:ProductItem], 1, (../my:LengthOfHire >= 84) * string-length(xdXDocument:GetDOM("ProductItemsData")/ProductItems/ProductItem/PriceMinTwelveWeeks[../ProductItemDesc = current()/../my:ProductItem])),
substring(xdXDocument:GetDOM("ProductItemsData")/ProductItems/ProductItem/PriceOneDay[../ProductItemDesc = current()/../my:ProductItem], 1, (../my:LengthOfHire < 3) * string-length(xdXDocument:GetDOM("ProductItemsData")/ProductItems/ProductItem/PriceOneDay[../ProductItemDesc = current()/../my:ProductItem]))
)
However I need to check if the number is > AND <.
eg.
(../my:LengthOfHire > 0 AND ../my:LengthOfHire < 3)
(../my:LengthOfHire >= 3 AND ../my:LengthOfHire < 7)
(../my:LengthOfHire >= 7 AND ../my:LengthOfHire < 28)
etc
Do you know if it is possible to do AND logic using the CONCAT and Substring approach?
Thanks in advance.
Cheers
Kevin