cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Refresh Calculated Value form field by JavaScript.

Jump to solution

Hi all,

we have a requirement to force a calculated form field to refresh. It has a variable of ErrorCount. It is not connected to any SharePoint list column. 

We need to refresh the field this way as the calculated form field uses the lookup run-time function to return how many items are in a particular list, and give the total amount of items, using below formula:

count(lookup("ErrorList","Reference",Reference,"ID",true))


Whilst the form is open the list - that the calculated field returns the count from - gets updated - another item is added to it. When this happens we post a function called callback to the form.

Inside this function we need to update the calculated form field to show the new list total/ item count.

The function callback is successfully called, as we have confirmed with an alert, but the calculated form field is not  being refreshed, updated.

Inside our callback function we have tried:

function callback() {

alert('function called OK');

NWF$('#' + ErrorCount).trigger('blur');

NWF$('#' + ErrorCount).trigger('change');

}

Any idea on how to get the calculated form value field to recalculate /update?

Reply
1 Reply
Workflow Hero

Re: Refresh Calculated Value form field by JavaScript.

Jump to solution

Below is the code you can use to refresh the calculated column

NWF.FormFiller.Functions.ProcessOnChange(NWF$("#" + txt_count);

client id of control : NWF$("#" + txt_count)

refer: Force refresh the nintex form using javascript 

0 Kudos
Reply