Rule Formula Error - Please Help - InfoPath Dev
in

InfoPath Dev

Rule Formula Error - Please Help

Last post 02-10-2010 08:39 AM by Alec Pojidaev. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-10-2010 03:50 AM

    Rule Formula Error - Please Help

    Hi

     

    I currently have a problem that is driving me insane!!

    I am trying to make a text field show the difference between 2 date picker fields. I have found a great website with all the rules written out and also a demo form to download with the whole solution working.

    I have replicated the exact data field types and there label names into my form, and then copied exactly the same rules and conditions to the fields created in my form,

    However I cannot get the 1st rule on the dateDifference field to work it produces the same error every time when testing the formula and being a relative nove at InfoPath I cannot understand what is going wrong.

    The rule and formula on the field is as follows:

    Rule 1

    Condition

    The Expression xdDate:AddDays(../my:startDate, substring-before(., ";")) != ../my:endDate

    And

    Day difference contains ";"

    Rule

    Set Fields Value - DayDifference -

    concat(substring-before(., ";") + substring-after(., ";") * ((translate(addDays(startDate, substring-before(., ";")), "-", "") < translate(endDate, "-", "")) * 2 - 1), ";", substring-after(., ";") / 2)

     The error message I am getting when  I click Verify Formula is Function 'AddDays' did not return a value, or it returned a value that cannot be converted to an XSL data type.

     Any help with this would be much appreciated.

     Thanks in Advance

    Geoff


  • 02-10-2010 08:39 AM In reply to

    Re: Rule Formula Error - Please Help

    It's better post that type of questions right on my site. AddDays sometimes behaive strange. I hit that problem couple times before. As I remember I deleted rule and recreated it again.

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.