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

Dynamic Forms - Part 3: Enabling the "Position" and "Industry" fields based on other values

For now, all of the fields on the “Add new” and “Edit” SharePoint list forms are enabled and visible. But, the requirement was that the “Position” and “Industry” fields are only enabled if the field “Company” has been entered. Field “Subindustry” should not be visible at all, if the field “Industry” has not been selected.

Let’s go back to the skybow Solution Studio, and make those changes.

With the fields “Position” and “Industry” in the “Attributes” section, we will change the “Enabled” expression to

[[Company]] != “”

This will make those fields enabled only if the value of the field “Company” is not an empty string. Note the skybow Solution Accelerators expressions notation here – double square brackets denote placeholders for the field names, from current or related lists. In this case, since those are dynamic expressions, we will use JavaScript in combination with skybow placeholders to determine whether the “Company” field is empty, and if not, enable the two fields from our requirement:


 

dynamics_07_enabled.png

 Setting enabled expression for the Position field.

 

For the Visible Expression in the Subindustry field, we will, for now, just enter “false” – this will make the “Subindustry” field invisible no matter which values we enter into other fields.

 

dynamics_08_visible.png

 

Setting visible expression of the Subindustry field to false.

 

After saving this configuration, and opening the “Leads” list item in either the “Add new” or “Edit” form, we will see that “Subindustry” is not visible at all, and that the “Industry” and “Position” fields are enabled only if the field “Company” is entered.

 

 

dynamics_09_conditionalenabled.gif

Behavior of Position and Industry fields based on the other fields values

 

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.