Skip to main content

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

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.


9259i1355279E245F605D.png


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.
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.

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 inputpcommandtype*='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.


Where do you put this Javascript? I've seen plenty of remarks about custom javascript section in settings but I don't see that in ours. We're running Nintex Forms 2019 v- 5.1.4.0


@Gunmune are you using the Classic or Responsive forms designer? JavaScript is only supported in the Classic forms designer, so if you are using Responsive there isn't a section for you to add the customer JS.


the way i do it is by creating a disable rule that disable all the controls in that form if its not New (meaning: control will be editable if they the form is in New mode that function is in the common tab when trying to create a rule) if i want a user to edit the form i just assign a flexi task with the form in it that looks exactly like the submission form.


Note: this way will work if your form doesn't have attachments


 


hoping this helps


Reply