u In this Microsoft InfoPath tutorial, we will discuss what are views in InfoPath, how to create a view in InfoPath? How to navigate from one view to another view in InfoPath in SharePoint Online. We will discuss how to write a rule on a button to navigate from one view to another view in InfoPath 2013 in SharePoint Online.
What is view in InfoPath?
By using Views in InfoPath, we can display data in different ways in InfoPath SharePoint Online or SharePoint 2013/2016. We can create multiple views of an InfoPath form.
If you have a large and complex form, then by using InfoPath views, you can split the form to the different page and the user can navigate to different views by adding some rules in Next Previous buttons.
By using InfoPath views, you can also show different versions of a form to different users based on role in the organization.
Using the view in InfoPath designer we can offer the user to look data in a different way.
By using the button control and add the rule in InfoPath we can easily switch one view page to another view page. We can copy one view page item to another view page. The view in InfoPath designer page is print friendly.
For example, one form template is there for review by the manager, user and HR people So we Create one view for the manager, second for the user and third for HR people. When a user opens the form the view is showing which is created for the user automatically, and when the manager will open the form he can able to see his view form. When HR people are open to the form they can able to see their view form.
We can also create InfoPath forms for print-friendly forms.
Create View in InfoPath Form Library
Here I will show how we can create a view in InfoPath form in SharePoint Online or SharePoint 2013/2016.
Here our requirement is to create 3 views in SharePoint Online:
- Employee Information
- Employee Professional Information
- Employee Hired Information
The Employee Information contains:
- Employee Name
- Employee Email
- Employee Mobile Number
The Employee Professional Information contains:
- Total Experience
Employee Hired Information contains:
- Employee Hire Date
- Employee Hired By
I have taken one scenario, I have 3 views named as view1, view2, and view3. When the user clicks on the “Next” button of view1 then automatically the view2 page will come. When the user clicks on the Previous button of view2 then view1 page will open in the InfoPath form.
Now we will discuss how to add or create a view in InfoPath 2013 designer page. Follow below steps to add a view in InfoPath 2013 in SharePoint Online.
Open the InfoPath 2013 designer page and you can see by default it is opening in view 1 page.
I have open SharePoint InfoPath designer page for add a table select “INSERT” and click on “Custom Table which is present under the “INSERT”. I have selected a table size from “Custom Table” as per my requirement.
I have created a form named “Employee Information” and added a Button control. Right click on Button we can able to see “Button Properties”.
In Button Properties page we can change the Label Button to Next.
Like that, we can change all view pages button control name to “Next” and “Previous”.
To create a new view Select the “PAGE DESIGNER“. Click on “New View” we can see a new box which is asking for the “New view name”.
Here I have given the view name as View2. Click on OK. Now our View2 page will open.
I have designed a FormLibrary in View2 page. Here I have created Employee Professional Information. Add two button control Next and Previous.
In the view3 page, I have created “Employee Hired Information” form.
How to add a rule in the Button Control in InfoPath form?
For adding a rule for a button, Select the button control and click on “Manage Rules“. We can able to see “Rules“. Select the “Action” from the New drop-down. In the “Rule type” we can able to see the which type of rule We selected from “New”.
I have changed the “Details for” name from Rule 1 to Rule for View1. Select “Switch views” from “Add” dropdown which is come under “Run these actions”.
Now we can able to see the Rule details page. In the view field from the drop down, we can able to see all the views. We want to switch to which view set here. I want when user click on “Next” the View 2 page will come. So I have selected View 2 from the drop-down. Click on OK.
Now publish the InfoPath form to SharePoint Online site.
Open the form Library from the SharePoint Online site. When we want to add New Item to the Form Library we can able to see the form. Here I have added some items and click on Next.
When we click on Next we can able to see the next View page. When click on Previous the view1 will show.
Here I have clicked on Next of view 2. So view 3 pages will come.
In the SharePoint form Library, we can able to see our data is saved. While saving it will ask for a file name. I have given the file name as “EmpInformation”.
You may like following InfoPath SharePoint tutorials:
- InfoPath 2013 multiple attachments
- Limit attachment size in InfoPath 2013 SharePoint online
- Make attachment field mandatory in InfoPath Designer 2013 in SharePoint Online list
- How to publish an InfoPath form to an email in SharePoint 2013/2016/Online
- Publish InfoPath Form to SharePoint Online Office 365 Step by Step Tutorial
- InfoPath cannot save the following form access denied SharePoint Online
This InfoPath form tutorial, we had discussed how to create multiple views in SharePoint InfoPath designer 2013. We were also discussed How to add the Button control and add a rule to the button control in InfoPath 2013 form. How the button control will work while adding Manage Rule to the button control.
I am Bijay a Microsoft MVP (8 times – My MVP Profile) in SharePoint and have more than 15 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com