Nintex for SharePoint Forum
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
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.
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.
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