cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Detect when user has edited a form field

Hello All,

 

I am very new to Nintex (and SharePoint for that matter). I have a form that a user would fill out for a travel request. However there are 60+ fields the user can add data to, such as Airline, rental car, hotel stays and many many more...

 

My question is: Once the request has been made and an approver has requested the user to update some field for whatever reason, how can I use the workflow to detect that the user has actually made a change to any one of the fields of the form, not just editing the form and clicking save to update the modified date.

 

Thank you

Labels: (2)
0 Kudos
Reply
4 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: Detect when user has edited a form field

Hi,

 

Not sure if this helps but you could have a conditional start workflow that starts if a previous value does not equal the current value.  60 conditions is a lot but it might be possible.

conditionalstart2.png

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Detect when user has edited a form field

Hi,

As I understand you correctly, you want to be able to verify for each field if the user has updated a field, if this is requested by the approver? That would be a major task to accomplish via a workflow, since you don't know what field needs to be update.

I would suggest to enrich the 'Appoval'-task with comments and add those comments inside the form (e.g. a Comments History field). When the user receives the rejected form, he/she can see the comments made by the approver. Then the requester re-submits the form, the approval can then check whether or not the appropriate changes are made.
0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Detect when user has edited a form field

I agree 60+ conditions is a lot, but it is what we're working with :-). Is it possible to grab all form values at once in the workflow and create a comparison between initial form values and modified form values? I feel like I could use a UDA with your approach above but one major limitation that creates is any future forms we create would need their own specific UDA for capturing and comparing form data.

Our goal is to hopefully be able to create a reusable process that compares form changes by the user or otherwise.
0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Detect when user has edited a form field

Hi @Gunmune,

 

using javascript on your form you can detect if any field changed: 

NWF$("document").ready(
  NWF.FormFiller.Events.RegisterAfterReady(function () {
    /*Read original state of form (all the fields when it was opened)*/
    var originalState = NWF$("#formFillerDiv :input").serialize();

    /*If a Save button is clicked 
  (commandtype seems to be added by nintex, it contains "Save and Submit", "Save and Continue", js Buttons have commandtype "JavaScript")*/
    NWF$("#formFillerDiv input[commandtype*='Save']").click(function () {
      var currentState = NWF$("#formFillerDiv :input").serialize();
      if(currentState === originalState) {
        //nothing changed, prevent save and alert user?
      }
    });
  })
);

This is not checking specific fields as you suggested but only if anything changed.

0 Kudos
Reply