Skip to main content

Here is the scenario. We are using flexi task form in which we would like to display 2 values, one is from the associated list item and the other one is from workflow variables:

value 1: CurrentEndDate(associated with the column "NonstopApprovalEndDate" in the list "SCPaymentList")

209622_pastedImage_3.png

value 2: PauseDelayDay (associated with workflow variable)

209623_pastedImage_4.png
This is the form design:

209621_pastedImage_1.png
This form is so sample. CurrentEndTime + PauseDelayDay = NextEndTime.
When user click pause button, a javascript action is triggered :

function UpdateField()
  //.....
  paymentItem.set_item("NonstopApprovalEndDate", NextEndTime);
  paymentItem.update();
  clientContext.executeQueryAsync(Function.createDelegate(this, this.onSuccessfulUpdatePaymentItem), Function.createDelegate(this, this.onFailedCallback));
}

function onSuccessfulUpdatePaymentItem(){
  NWF.FormFiller.Functions.ProcessOnChangeEvents();
  NWF.FormFiller.Functions.ProcessOnChange(NWF$("#"+CurrentNonstopApprovalEndDate));
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

We now can update the value in the list successfully. However we have no idea on how to refresh this form and display the updated value in the list. I found this article Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?  I followed @Pierre Fudala suggest script using

NWF.FormFiller.Functions.ProcessOnChangeEvents(); 

but seems no effect. Do we use it in wrong way?? Where can we find the API manual about this function?? 

How can we force the form to update the calculated fields? Even refresh the special form controls like panel?
Does nintex support this feature in it? If not is there any workaround?

Many thanks!!!happy.png

Hi Angela,

I am not sure if this is good way!, read the current url using window.location.href and redirect to the same page (nothing but reloading the page) using javascript. This way the page gets loaded again.


Reply