Displaying a Message based on what date is selected - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Displaying a Message based on what date is selected

Last post 01-28-2010 12:02 PM by Michael71. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-27-2010 12:41 PM

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 279

    Displaying a Message based on what date is selected

    1. I have a date picker in a repeating table and a text field.

    2. I want to display a message in the text box, based on the date I chose in the date picker.

    3. If the date falls in the 1st Quarter- message 1

    4. If the date falls in the 2nd Quarter - message 2 

    5. If the date falls in the 3rd Quater - message 3

    6. If the date falls in the 4th Quarter - message 4

  • 01-27-2010 09:38 PM In reply to

    Re: Displaying a Message based on what date is selected

    use rules on the date picker to set the value of text box.

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 01-28-2010 07:15 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 279

    Re: Displaying a Message based on what date is selected

    I've done that but it still won't work. Can you tell me why the below syntax don't work.

    Condition

    Date  Begins with "1"  or

    Date Begins with "2"   or

    Date Begins with "3" 

    Action

    =fx Set a Field's value

    Field = Quarter

    Value = concat("LEAP Quarter 1 ", number(substring(., 1, 4)), "")

     

     

     

  • 01-28-2010 07:33 AM In reply to

    Re: Displaying a Message based on what date is selected

     XML dates are always in the format YYYY-MM-DD, so the month is represented in the 6th and 7th characters.  The way you have it set up now, your rule is just looking at the first character, which is the first digit of the year.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-28-2010 08:48 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 279

    Re: Displaying a Message based on what date is selected

    What do you recommend that I do so that it works?

  • 01-28-2010 12:02 PM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 279

    Re: Displaying a Message based on what date is selected

    I figured it out. Just write a rule if date contains -01-  or  -02-  or   -03-  set field = Quarter 1

                                                                       -04-   or  -05-  or  -06-  set field = Quarter 2  and so on

     

    The Date picker will never contain more that one date of the month with the " - " on bothe sides!

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