<img height="1" width="1" src="https://www.facebook.com/tr?id=730305433807073&amp;ev=PageView &amp;noscript=1">
Book a Demo

Dynamic Forms - Part 4: Setting “Subindustry” to be visible and required if “Industry” is selected

In the last step, we set the SharePoint field “Subindustry” to be invisible all the time (we set its “Visible expression” to “false”).

The customer’s requirement is to make that field visible only if the “Industry” field has been selected (it is a lookup field). So, in the next step, we need to change the visibility of the “Subindustry” field based on the selection of the “Industry” field. We will first change “Visible expression” of the “Subindustry” field from “false” (the value we set it to in the previous step) to:

[[Industry]] != ””

This will make the “Subindustry” field visible only if the “Industry” lookup field is populated.

But, since the “Industry” field is enabled only if the “Company” field is not empty, we will need to do the same for the “Subindustry” field, otherwise the form behavior will be weird. So, we will also set the “Enabled expression” of the “Subindustry” field to:

[[Company]] != ""

The last thing we need to do is to set the field “Subindustry” to be required if the field “Industry” has been selected. But here, also, we will need to pay attention to the current value of the company field. So we will set the “Required expression” of the “Subindustry” field to:

[[Industry]] != "" && [[Company]] != ""

This will make the “Subindustry” field required only if both the “Industry” and “Company” fields are filled in:




Setting visible, enabled and required expressions for the subindustry field


If we now check the behavior of our form, we will see that all the customer requirements regarding enabled and visible fields have been met:



Behavior of Subindustry field based on the values of other fields


In less than 5 minutes, just by using skybow Solution Accelerators, we have met the customer’s requirements of making the “Industry” and “Subindustry” fields enabled and visible, based on the values filled into another fields.


You want to read the whole story? Click here to get the eBook!

Rich Forms eBook

Adis Jugo

Written by Adis Jugo

is Director of Product Technology at skybow, and a software architect with over 20 years of experience. Adis is double Microsoft MVP (Most Valuable Professional) for Office Development and for Office Servers and Services. He first met SharePoint (and Microsoft CMS server) back in 2002, and since 2006 his focus was completely shifted towards architecture and development of productivity solutions, now based on the Azure, Office 365 and SharePoint technologies. Adis is an internationally recognized speaker with over 15 years of speaker experience, speaking at various Microsoft, Community and SharePoint/Office 365/Azure conferences worldwide.