More than 5 conditions in InfoPath forms rule – Infopath form was one of best lightweight form designer tools from Microsoft Office product, but unfortunately from the year 2022, Microsoft will stop support for Infopath Form. But still, in the industry, the Infopath form has been used widely. As we know in Infopath form we have the limitation of writing 5 conditions in the rule, after writing 5 conditions the “And” button will be disabled. But it is very much needed for the business logic to have more than 5 conditions.
So, here I will share some techniques about how we can add more than 5 conditions in the Infopath form’s rule.
Conditions in InfoPath forms rule
Below is my Infopath form where I want to disable the checkbox until all 9 textbox fields have been filled-up. But as we see in the below screen after adding 5 conditions the last “And” button is disabled.

We see the “And>>” button is disabled, after adding 5 conditions because in the traditional way Infopath does not allow to add more than 5 conditions.
Add more than 5 conditions in InfoPath forms rule (complex condition expression InfoPath)
Then, how we can add more than 5 conditions to handle the disabled logic? Yes, we can there is another way to do this. In the last rule, here it is “field5” click on the “The expression” from the dropdown list as below:

Once we click on the “The expression”, will get the below text.

my:field5 = ""
Copy the above text in the notepad or any text editor. And write as many as you want and/or conditions. For this demo scenario, I have added or condition.
my:field5 = "" or my:field6 = "" or my:field7 = "" or my:field8 = "" or my:field9 = ""
Then finally, copy the modified text into the same box.

When we have a requirement to add multiple and/or conditions (more than 5), then we can use the above expression technique to handle the scenario.
Demo: Once we add the rules to handle the multiple conditions something like the below:
if "field1" is blank or if "field2" is blank or if "field3" is blank or if "field4" is blank or my:field5 = "" or my:field6 = "" or my:field7 = "" or my:field8 = "" or my:field9 = "" Then Disable this control
In the below example, the checkbox will only be enabled if all the textbox is filled up.

Summary: Conditions in InfoPath form rules (complex condition expression InfoPath)
Hence, in this article, we have learned about the technique we can add more than 5 conditions in the Infopath form’s rule.
See Also: SharePoint Online tutorial
You may also like the below SharePoint Online tutorials:
- How to validate the date column in Infopath form
- How to a copy list item to another list using SharePoint designer workflow
- SharePoint Framework (SPFx) development environment Setup step by step
- 3 ways add a picture library in the communication site – SharePoint Online
- SharePoint generation or version history from the year 2000 to 2020
- Office 365: Getting started with SharePoint PnP PowerShell – installation
- In 2 steps convert a classic SharePoint page to modern using PnP
- Office 365: Retrieve hub sites and associated sites using PnP Powershell
- Create a modern team site using PnP PowerShell in SharePoint
- In 4 steps access SharePoint online data using postman tool
- SharePoint admin center: Learn SharePoint online administration in an hour – step by step
- SharePoint REST API: GET vs POST vs PUT vs DELETE vs PATCH
- Office 365: Understanding the hub site in SharePoint online
- Create SharePoint online list using PnP provisioning template
- List Template IDs In SharePoint Online/SharePoint 2019/2016/2013/2010/2007
- InfoPathDev
