Compare dates in repeating table - InfoPath Dev
in

InfoPath Dev

Compare dates in repeating table

Last post 03-14-2013 02:27 AM by Dmitriy. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-28-2013 07:59 AM

    Compare dates in repeating table

    I can't to compare 2 dates in repeating table. This rule msxsl:string-compare(/my:RateOverride/my:Rates/my:StartDate, /my:RateOverride/my:Rates/my:EndDate) >= 0 works just for the 1st row. Could you help me, please?
  • 03-11-2013 02:34 AM In reply to

    Re: Compare dates in repeating table

    Help plz, still need help
  • 03-11-2013 07:50 AM In reply to

    Re: Compare dates in repeating table

     What is the field the condition is on? Can you attach a screenshot of the data source under the Options tab? Or just attach your form?

    Hilary Stoupa

  • 03-12-2013 01:04 AM In reply to

    I have secondary datasources(2 xml) and i work with them in codebehind via wcf (https) to fill in drop down lists on the form. So what I need is to disable button in case when in any row of repeating table start date > end date. Problem is that msxsl:string-compare(/my:RateOverride/my:Rates/my:StartDate, /my:RateOverride/my:Rates/my:EndDate) >= 0 works just for the 1st row and doesn't work for other rows.

  • 03-12-2013 08:08 AM In reply to

    Re: Compare dates in repeating table

     Mind showing what the actual data source is? What is the repeating group? I'm guessing the condition is on the button?

    Hilary Stoupa

  • 03-13-2013 10:33 AM In reply to

    Re: Compare dates in repeating table

    I attached screenshot.... Repeating group - Rates. Datasource - xml, that filling in via managed code.Yes. Condition is on the button.

    if it so important what datasource I use for ddls:
    <?xml version="1.0" encoding="UTF-8" ?>
    <items>
    <item><value/><displayname/></item>
    <item><value/><displayname/></item>
    </items>


    just use it for databinding ddl with WCF... thats it. Does it affect on date validation in repeating table?Still need to validate StartDate<EndDate in whole repeating table.. not only in the 1st row. Thanks

  • 03-13-2013 10:48 AM In reply to

    Re: Compare dates in repeating table

     My question was about your main data source. Your original screenshot showed only the form layout, which tells me nothing about the XPath for the nodes. But, that said, taking another look - the button is outside of the repeating section and thus that condition would by default be only considering the first row. I'm attaching a sample form - save it locally and then right click and select design to open in design mode.

    I'm guessing your XPath expression will need to be:

    /my:RateOverride/my:Rates[msxsl:string-compare(my:StartDate, my:EndDate) >= 0]

    EDITED TO ADD: I clicked on your original screenshot and see the main data source now - sorry about that! It wasn't displaying until I opened the picture itself.

    Hilary Stoupa

  • 03-14-2013 02:27 AM In reply to

    Re: Compare dates in repeating table

     Thanks a lot! Works fine now)

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