Hi Hilary,
I have a different issue I was hoping you could help me with if you get chance. I'm using INFOPATH 2010.
I'm using the formula below; however, getting an "Expected value type, Actual value: name error". Any idea what I am doing wrong? Thank you.
SNOWMAN
concat(substring-before(.,";")+substring-after(.,";")*((translate(xdDate:AddDays(../my:startDate,substring-before(.,";")),"-","")<translate(../my:endDate,"-",""))*2-1),";",substring-after(.,";")div2)
The full formula is:
startDate rule: condition expession: ../my:endDate != ""
field: dayDifference
string value: 0;4096
endDate rule: condition expession: ../my:startDate != ""
field: dayDifference
string value: 0;4096
dayDifference rules:
MainRule:
condition expession:xdDate:AddDays(../my:startDate, substring-before(.,
";")) != ../my:endDate and contains(., ";")
field: dayDifference
xPath expression: concat(substring-before(.,
";") + substring-after(., ";") *
((translate(xdDate:AddDays(../my:startDate, substring-before(.,
";")), "-", "") < translate(../my:endDate,
"-", "")) * 2 – 1), ";", substring-after(.,
";") div 2)
finalize rule:
condition expession: contains(., ";")
field: dayDifference
xPath expression: substring-before(., ";")