If you have a InfoPath 2010 form where you have to show/hide sections or bring in Accordion effect on your customized form, please use this approach below.
Hide The Section
Add a section to your form from the controls choices

You can then add all the controls you want to hide within the new section
Now add a field to the form, but not in the section and call it ShowApproval
Set the default value for this field to No
Now select the section and click Manage Rules

Click the New button and select Formatting
Give the rule a name and select the settings shown below

This rule works by looking at the ShowApproval field and if it set to No (the default value) it hides the section and therefore all the fields within that section
Show The Section On Form Load
So the section is now hidden but we want that section to be viewable after the form has been filled in by the user so that the approval process can be completed by the people necessary. To do this we are going to set a rule on form load that looks to see if a certain field in the form has been completed and if it has, change theShowApproval field to Yes and therefore the approval section will not be hidden
You need to choose a field for the form load rule to look at, it needs to be a field that is automatically blank but has to be filled in
Click on the Data tab and select Form Load

This will load the Form Load rules task pane

This rule will look at a field within the form and if that has been completed it will change the value of theShowApproval field to Yes and therefore show the section. To do this click the New button and select Action and complete the rule as shown in the graphic

The condition on the rule is set to look at a field within the form and check it is not blank
If its not blank then it sets the value of the ShowApproval field to Yes, the rule details for that section is shown below

And Finally
If you follow these steps then you should now have a form that loads up and hides the section that contains the approval fields. Once the form is completed and saved the next time it is opened by the appropriate staff it will show the approval section.
While this method works what it doesn’t stop is the user re-opening the form and seeing the approval section, that is down to trusting the users.
Courtesy: http://blogs.msdn.com, http://www.edutechnow.com/
Like this:
Be the first to like this post.