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

Advent Calendar Door 15: Advanced validation in SharePoint list forms.


Posted by Adis Jugo - 15 Dezember, 2017

Advanced validation in SharePoint list forms

Validation in list forms is again one of the evergreens for SharePoint professional developers and solution creators alike. In today’s skybow Advent Calendar cookie, we will see how to create form validation – regardless if simple or advanced– with skybow Solution Studio and skybow Rich Forms.

Imagine there would be a requirement to validate the form field “Request Notes”, in a way that it has to contain at least 100 characters, for everyone, except for the members of the “Management” SharePoint group (because managers don’t need to explain anything, obviously 😊).

We will open that list form, either with skybow Solution Studio or skybow Rich Forms, select the “Request notes” field, and then set the following validation expression:

[[@User.IsMemberOfGroup("Managers")]] ? true :

([[requestnotes]].length > 100)

This expression in skybow Expression Language (which is a SharePoint-supercharged JavaScript) basically checks if the current user is member of the “Managers” group, and if not, checks if the “Request Notes” field’s length is larger than 100 characters.

In the “Validation text” field, we have a simple statement that the length needs to be larger than 100 characters.

Validation Condition skybow

You can create arbitrary complex validations with skybow Expression Language, either using assignment expressions like this one (those are usually Excel-like formulas), or, if you feel like it, more complex code blocks using Function code expressions which allow full blown JavaScript.

The result, when you run this form and try to fill in the form with too short Request note will be as following.

Request more Information Rich Forms

Altogether, it took us less than 5 minutes to achieve this with skybow Solution Studio or skybow Rich Forms.


Topics: Office 365, Sharepoint, SharePoint Online

Recent Posts

9 Hidden Costs of Power Platform

read more

Do you already work modern? (Part 5 of 5)

read more

5 years skybow - what a journey

read more