Nintex Forms O365 - Rules not applied when in Edit Item mode

  • 22 January 2020
  • 1 reply
  • 14 views

Badge +2

Hi all,

 

I am having some trouble regarding getting rules in Nintex Forms (Office 365) to work in both New and Edit mode.

 

I have set up the following:

 

A visitor registration form with the following fields:

 

- Host - SharePoint People and Groups column

- Cell Phone - SharePoint Single Line of Text

- WorkPhone - SharePoint Single Line of Text

- Email - SharePoint Single Line of Text

 

The principle I want to achieve is that the user enters a Last name + First name in the Host field and the userProfileLookup() function fills the Cell Phone, Work Phone and Email address.

 

The way I set this up at the moment is by:

 

- creating 3 variables using the userProfileLookup() function to be used to fill respectively the Cell-, Work Phone and Email fields.

- creating a rule that set the variable to the value of each field (see screenshot)6242iE25335FCD42A48FC.png

The above works like a charm when running the form in the Designer both in New Mode and Edit Mode. It also works as expected when creating a new Item in the actual list (the production list so to speak).

 

However, when an item is created, it is stored correctly, but when I update the Host field the fields Cell Phone, Work Phone and Email are not updated.

 

The only way I am able to have those fields updated is by removing the Host value, Submit the item, then reopen the item and enter the new Host value.

 

Where am I going wrong? I expect that the form works the same in both New ande Edit mode. Is this a misunderstanding? I could really use some input on this as I am really not seeing the solution.

 

Thanks in advance for any feedback or input. If you require more information please let me know.

 

Thanks again!

 

Regards,

Remco


1 reply

Badge +2

hI,

 

I think I resolved this already. I resolved this as follows:

 

I disconnected the field Host from the SharePoint People & Groups column Host.

Then I added a Nintex People Picker field which I connected to the SharePoint column Host instead (btw.. I hide the People Picker as I do not want anyone to enter anything there, as I want the Form rule to populate its value).

 

I updated my rule as follows:6250iD3764B7AFCF5E455.png

The only new variable var_Host is set to: userProfileLookup([Form].[Host],"PreferredName"). This variable is only recalculated in New and Edit mode, otherwise your Display mode will get into an endless loop :).

 

This way the user enters the user account name in the disconnected Host field, while the hidden People Picker field writes to the SharePoint column Host.

Both in New and Edit mode the personal details are updated as expected. Happy times.

 

Kind regards,

 

Remco

Reply