Conditions in rules limited to 5? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Conditions in rules limited to 5?

Last post 08-10-2018 09:52 PM by Mounika. 21 replies.
Page 1 of 2 (22 items) 1 2 Next >
Sort Posts: Previous Next
  • 03-17-2010 01:36 AM

    Conditions in rules limited to 5?

    Hello

    I am trying to conditionally form a section (show/hide) based on values in my form. There are more that 12 fields that need to be validated before I can show or hide a particular label. However when I try to add conditions for formatting I cannot add more than 5 Conditions? How can this be overcome?

    Thanks in advance! 

     

  • 03-17-2010 08:07 AM In reply to

    Re: Conditions in rules limited to 5?

    You can overcome this by changing your last condition to "The expression" and use "and" or "or" as needed to create your compound condition. So, for example, if you need to make sure both field1 and field2 are not blank, you'd use the expression:

    my:myFields/my:field1 != "" and my:myFields/my:field2 != ""

    If you need help figuring out the correct syntax for your expression, first set up the condition using the drop downs (for example, select field1 in your first drop down, then "is not blank" in your second drop down), then change the first drop down to "The expression" -- whatever your condition was will auto populate into the box for the expression. Paste that into a text editor, and then do the same for the rest of your conditions. Add and or or between them as needed, and you have your expression!

    Hilary Stoupa

  • 03-17-2010 08:47 AM In reply to

    Re: Conditions in rules limited to 5?

    Thanks a lot Hillary! That helps. I was going to write code for this, you just saved me. Thanks again!

  • 04-24-2012 03:33 AM In reply to

    • kball68
    • Not Ranked
      Male
    • Joined on 09-14-2006
    • United Kingdom
    • Posts 6

    Re: Conditions in rules limited to 5?

    Many thanks for this excellent post - its saved me a lot of time and trouble with one of my Forms.

    Kev B
  • 04-20-2013 06:57 PM In reply to

    Re: Conditions in rules limited to 5?

     Hi Hilary

     I have tried your suggestion but unfortunately cannot get it to work. I have 8 sections in a form that need to be hidden and shown based on one option in each section.

    I pick a section and add a rule that goes through and checks the value of a dropdownlist field in each section. I can add the condition for the first 5 but can't for the remaining 3. If the 5th condition is my last condition, I try to change it to "The expression" as you have suggested in your post above but when I try to paste the remaining three conditions it only accepts the first one in the string.

     This is the condition I am trying to paste in the last condtion expression where "Miscellaneous", "EmploymentContract" and "HigherDutiesPositionDetails" are names of sections in my form:

     ../my:Miscellaneous/my:Miscellaneous_FurtherChanges/my:EmployeeStatusOptions_6 != "something" and

    ../my:EmploymentContract/my:EC_FurtherChanges/my:EmployeeStatusOptions_7 != "something" and

    ../my:HigherDutiesPositionDetails/my:HigherDutiesFurtherChanges/my:EmployeeStatusOptions_8 != "something"

     

    When I try to paste the above it stops after the first one which is "../my:Miscellaneous/my:Miscellaneous_FurtherChanges/my:EmployeeStatusOptions_6 != "something" and"

     

    I am using InfoPath 2010, any ideas??

     Thanks Hilary.

    Regards

    Yoshi

     

    EDIT: I got it working, I had to manually copy the next condition and paste it after the and.

     

  • 05-14-2013 03:13 AM In reply to

    • Monali
    • Not Ranked
    • Joined on 05-14-2013
    • Posts 7

    Re: Conditions in rules limited to 5?

    When we click on rule --> expression --> how i ll select the field? my:Miscellaneous/my:Miscellaneous_FurtherChanges/my:EmployeeStatusOption This things how u gave ,or else if i ll give only the field name
  • 05-14-2013 07:19 AM In reply to

    Re: Conditions in rules limited to 5?

     I usually select the field first, then change the first drop down from the field to "The expression" -  that will show you the correct XPath to the field. You can actually set up the entire condition, switch to "The expression" & then copy and paste the expression into a text editor, set up the next condition (using the same row in the UI), change to "The expression", copy into a text editor, etc. Then in your text editor, add your "and" and "or" as needed to connect all the expressions, copy the whole mess and paste it back into the expression text field.

    Hilary Stoupa

  • 06-04-2013 11:17 PM In reply to

    • Monali
    • Not Ranked
    • Joined on 05-14-2013
    • Posts 7

    Re: Conditions in rules limited to 5?

    Thank u very much...It was really helpfull
  • 02-21-2014 10:52 AM In reply to

    Re: Conditions in rules limited to 5?

    Is an operator for the does not begin with function?

    Jeffrey J Vojtko
  • 02-21-2014 11:07 AM In reply to

    Re: Conditions in rules limited to 5?

    I was stumped by the limit of 5 conditions as well. I have a requirement to fire an error if the string in a text box doesn't start with P, A or Q.

    Of course I also need a "is not Blank" operator as well to prevent the error after populate. That would total 6 conditions.

    Is there an operator for "in not Blank"?

    Jeffrey J Vojtko
  • 02-21-2014 11:15 AM In reply to

    Re: Conditions in rules limited to 5?

    Is not blank is written like:

    != ''

    You can learn what the actual expression looks like by first using the drop downs, then setting the first drop down to "The expression" and you'll see the actual XPath in the field next to the drop down. :)

    Hilary Stoupa

  • 04-15-2014 09:34 AM In reply to

    Re: Conditions in rules limited to 5?

      Hi Hilary, I hope you can help me out, I need to add a condition but this 5 rows limitation doesn't allow me to do this, and perhaps the expresion usage can help me, what would you recommend to do for the following problem,

     I have to add three values like the last two with the value called Hold. I have tested this and it will work, but how can I add another value with the condition is not equal to, this is the current image,

     

    And I need this rule like as follows, what would you recommend to use?

     

    Could be something like:

    The Expression :  my:FIGDateRec != "Info Requested" and my:FIGDateRec != "Re-assigned" and my:FIGDateRec != "Hold"

    Thank you 

  • 04-15-2014 10:06 AM In reply to

    Re: Conditions in rules limited to 5?

     Hi, it has been really hard to paste an image in here, but, this is the link of the image,

    https://lh5.googleusercontent.com/xd5B4PUPRUJZok5RjXSUIuiwbi6OrVY-t1msPm-a-Q=w525-h207-p-no  

  • 08-28-2014 11:50 AM In reply to

    Re: Conditions in rules limited to 5?

     Hello Hilary,

        I'm trying to use the work around you've got posted, but I'm having trouble.  My form has 8 check boxes that when checked unhide a section.  I have one section that I'm using as a splash screen and I want to hide that when the sections are checked. 

    All is good up until I hit that 5 condition limit and then trying to use this ../my:Materials = string(true()) or my:NewDate = string(true()) my:FSTech = string(true()) or my:FSManager = string(true()) it fails to hide all but the first part of the string.  I thought maybe I needed to change string to Boolean and that completely hid the section no matter if anything was checked or not.

    Any ideas?

     

  • 09-02-2014 08:35 AM In reply to

    Re: Conditions in rules limited to 5?

    BP,
    You are missing an OR in your statement.
    ../my:Materials = string(true()) or my:NewDate = string(true()) OR my:FSTech = string(true()) or my:FSManager = string(true())
    I also think you are going to have a challenge showing a section based on the values in 8 different controls.
    Jeffrey J Vojtko
Page 1 of 2 (22 items) 1 2 Next >
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.