Hidden section not displaying when using rule criteria - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Hidden section not displaying when using rule criteria

Last post 04-20-2018 12:44 PM by Hilary Stoupa. 32 replies.
Page 2 of 3 (33 items) < Previous 1 2 3 Next >
Sort Posts: Previous Next
  • 04-12-2018 11:45 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    After clicking and clacking I'm seeing a strange behavior. When I preview the form, select a Reporting 100 class, the new dropdown box appears, but no required asterisk shows. Then when I select a value in that dropdown box, it populates the box just fine. Then when I select the drop down box again, and then select the Null blank row (no default value is assigned to the dropdown box)... THEN the asterisk shows. Odd. So its as if its there but doesn't show until after you select a value and then update it to Null.

  • 04-12-2018 11:59 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    You can see what I'm talking about here. I recorded a video.

    https://www.smugmug.com/gallery/n-B665HL/

  • 04-12-2018 05:53 PM In reply to

    Re: Hidden section not displaying when using rule criteria

    Here's your form with some fields at the bottom that I hope will help troubleshoot. I added the same field 3 x - once highlighted if blank, once if not present, and a text box to show the actual value. Preview and see if either of the two dropdowns I added are highlighted before or after you toggle the field value.
    Hilary Stoupa

  • 04-13-2018 05:05 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    Thanks again Hilary! You've been an invaluable help to me. Strangely, the form template that I was using yesterday that didn't show the required asterisk, now shows today! I'm not sure why all of sudden it would work today but not work yesterday. I'm using the exact same form. Either way the asterisk is now showing as expected and I didn't change anything (except rebooting my PC this morning). Nonetheless I am good to go. I hope our conversation helps someone else here.

    I do have another question but I will start a new thread if I can't find the solution on the forum.

    Thank you and have a great day! 

  • 04-19-2018 10:57 AM In reply to

    Hi Hilary!

    I thought this was good to go. I pushed this to live last night was not able to complete the form as it said a required field was not filled out. Reporting Access Required. As you know that section is conditional and only appears when the user selects a Reporting 100 class. However when they do not select a Reporting 100 class, it is still wanting that field filled in, even though it's not showing. I had to remove the validation rule. So now it appears when they Select Reporting 100 but its not required. It needs to be required when Reporting 100 is selected, other wise it should be hidden and not required to submit the form.

    Here's the validation rule I removed:

    The expressions:  starts-with(xdXDocument:GetDOM("ClassInfoForEnrollementForm")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Class[../d:ID = current()/../my:Class], "Reporting 100")
                                 starts-with(../my:Class, "Reporting 100")
    Reporting Security Access:  is blank 

    Any idea why this is happening? I was using the same type of logic that's being used on another field and that one works as expected. I've attached my current template again with the rue removed.

    Thank you so so much for your help. 

  • 04-19-2018 11:21 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    So on the field where this is working, is this also a validation rule?
    Hilary Stoupa

  • 04-19-2018 11:27 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    Yes.

     

  • 04-19-2018 11:32 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    Which field?
    Hilary Stoupa

  • 04-19-2018 11:40 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    Field: Purpose For Reporting Class

    Rule which works properly: 

    Rule Type Validation:
    Value - "Reporting (eParc)"
    Purpose For Reporting Class is Blank

     

    Field: Reporting Security Access

    Rule which did NOT work properly and has since been removed:

    Rule Type Validation:
    The expression: starts-with(xdXDocument:GetDOM("ClassInfoForEnrollementForm")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Class[../d:ID = current()/../my:Class], "Reporting 100")
    Reporting Security Access is Blank 

     

  • 04-19-2018 11:44 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    I'm going to run a test on a list form later today & see if this reproduces for me at all. Just in case the issue is with the custom validation - I'll let you know what I learn
    Hilary Stoupa

  • 04-19-2018 05:07 PM In reply to

    Re: Hidden section not displaying when using rule criteria

    Hey, Lou, I'm sorry, but I didn't get a chance to try this today. I will in the morning. :)
    Hilary Stoupa

  • 04-20-2018 07:32 AM In reply to

    No worries. I have attached my latest iteration of the form. All is well except for making the Epic Depts MS box required, which I guess is not possible through a normal Validation rule. Also the Validation for the Reporting Security Access drop down box is not working either. Everything else is working and good to go. I have attached the template for your review if its helpful. Thank you again!

  • 04-20-2018 07:56 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    I can't reproduce this - I set up a similar scenario on my SharePoint 2013 site, with a choice column that I made required if the lookup's ID = an ID where the title started with a certain string, so much like yours for the Reporting Security Access - and my validation works as anticipated. Perhaps since you have a submit request button on your form, you could just disable that instead, if the Reporting Security Access field isn't populated when it is needed?
    Hilary Stoupa

  • 04-20-2018 08:34 AM In reply to

    Hmmm. That's odd that it works for you and not on my form.

    Yes disabling the Submit button would work as well. I already tried doing that without success though.

    I used the following Rule:

    Condition:
    not(starts-with(xdXDocument:GetDOM("ClassInfoForEnrollementForm")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Class[../d:ID = current()/my:Class], "Reporting 100"))  AND
    not(starts-with(xdXDocument:GetDOM("ClassInfoForEnrollementForm")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Class[../d:ID = current()/my:Additional_x0020_Classes], "Reporting 100"))  AND
    Reporting Security Access is Blank 

    Rule Type: Formatting. Disable this control is checked. 

    The Submit button never disables for me. I've attached the template again with the rule above. I would love to get this all wrapped up today as I am out of the office all next week. Any assistance is greatly appreciated!

  • 04-20-2018 08:45 AM In reply to

    Re: Hidden section not displaying when using rule criteria

    The current function is contextual - I think you need something like this on your submit button: starts-with(xdXDocument:GetDOM("ClassInfoForEnrollementForm")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Class[../d:ID = current()/dfs:dataFields/my:SharePointListItem_RW/my:Class], "Reporting 100")
    Hilary Stoupa

Page 2 of 3 (33 items) < Previous 1 2 3 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.