Nintex continues to build upon the range of data sources that can be managed as data source variables (DSVs) on the forms designer External Data tab. The latest data source to be added is Azure Active Directory (AAD) permitting functionality that has been regularly noted in feature requests. Let's look at an example.
In this instance, I've already created a connection to AAD on the connections page.
Now let's create a data source. For the most part, this screen hasn't changed, it still contains the same configuration options seen below:
However, there is a new option at the bottom of this screen to specify the columns to be made available in the data source - as with other data sources, you can leave this empty to retrieve all columns.
Now, I'm going to build a simple form that allows selection of a user from AAD, and then populates other form controls with data related to that user i.e. Department, Job Title, Office and Mobile Phone - here's my form. You'll note that the related fields have been made read only as I simply want to show details stored against the user profile.
The Employee selector is a data lookup control which is configured to use the data source that was just created. Now that we can access more details coming from AAD I can change this control to e.g. show employee name in the dropdown but store the value as employee email address - this wasn't possible before - we could only show email address.
In order to populate my read-only related data fields I need to do 2 more steps
- Create a data source variable for the AAD data source
- Add a rule to set the form control values using the DSV once an employee is selected
To create the DSV, go to the External data tab and click the Create data source variable button
My DSV is configured with a meaningful name and to use the appropriate connection:
Importantly, I'm going to add a condition to filter it based on my Employee selection control.
I now have a DSV for AAD, and as you can see I will be able to use the First Record object to retrieve data for my selected user (because of the above condition).
Now all that remains is to create a rule to set the values of the related controls. Let's start with Department. Here's the beginning of my rule:
When I select the +Insert tab, any External data I have created will now be available for selection, so I can browse to get the department value.
Once complete my rule looks like this:
Now we can test this out.
Upon selecting an Employee, we briefly see the indication that data is loading:
...and then the data loads.
In this simple example we've shown some additional data from AAD. However, there are many other permutations that might follow based on this capability. We might contextualise the behaviour of the form to show and hide groups of controls or individual controls based on department, job title or location. E.g.
You can probably think of many more use cases. Give it a try and feel free to add any comments!