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

Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?

Jump to solution

Having upgraded to latest release of Nintex Forms 2013 we see synchronization issues that cause some of the lookup controls to be evaluated later than async formulae try to use their values (Support case under way with mitchellslater​).

So here's the question to all Forms developers, maybe someone knows: Is there a JavaScript function we could call to forcefully invalidate, refresh and reevaluate all lookups and calculated controls on a form?

0 Kudos
Reply
7 Replies
pfudala
Nintex Newbie

Re: Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?

Jump to solution

Hi Alexey,

You could use this following function to refresh all calculations :

NWF.FormFiller.Functions.ProcessOnChangeEvents();

If you want to target a specific control, you could also use this one :

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

Reply
akrasheninnikov
Nintex Newbie

Re: Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?

Jump to solution

Tried that, but no queries followed

Update: the trick was to find and update the hidden input that actually had subscribers to that event, not the one that was obvious and had no subscribers.

0 Kudos
Reply
pfudala
Nintex Newbie

Re: Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?

Jump to solution

What are you exactly trying to do?

Are we able to reproduce it in order to find solutions?

0 Kudos
Reply
akrasheninnikov
Nintex Newbie

Re: Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?

Jump to solution

I'm trying to come up with a remedy in a situation where forms that worked suddenly work for some items and not for others. A control displaying (control mode=diplay) a pre-populated lookup value that should filter a lookup query suddenly gets overlooked by query builder and the lookup function looks for <IsNull><FieldRef Name='ID' /></IsNull> which is nonsense by itself. Mitchell almost reproduced this but in his case that lookup function is reevaluated, unlike in our case. I need to force this invalidation and reevaluation without major rebuild of a complex set of form templates.

0 Kudos
Reply
akrasheninnikov
Nintex Newbie

Re: Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?

Jump to solution

Well, seems like you pushed me in the right direction. I investigated the issue deeper and found another control with similar settings that wasn't updated and blocked the chain of value updates. A bit of JavaScript magic and the forms seem to work again. Merci Pierre!

Reply
trish
Nintex Newbie

Re: Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?

Jump to solution

Hi Alexey,

Could you please give a bit of code to understand what worked for you?

Thanks in advance

Trish

0 Kudos
Reply
akrasheninnikov
Nintex Newbie

Re: Is there a JS way to force refresh of Lookup controls in Nintex Forms 2013 on-prem?

Jump to solution

Trish, it wasn't the code actually, it was the form design: several controls of similar meaning, some of them hidden and playing a greater role than those readily available in the UI.

0 Kudos
Reply