Using values returned by SQL Request Form Control in Calculations

  • 17 April 2018
  • 4 replies
  • 6 views

Badge +6

Good Day,

Using Nintex Enterprise 2016 on Premise. 

I am building an expense request Workflow and seem to be struggling with using the data returned by 2 SQL Request controls on my form.

The Controls work perfectly and return the expected data, 1 returns Allocated Budget for the current year for the selected GL Code and the second returns Approved Budget for the current year for the selected GL Code.

What I need to do is use the returned values to calculate Available Budget but i just don't seem to be able to use the values returned in my calculation.For info this is a repeating section and calculated value has been set to recalculate on New and Edit mode. 

214405_pastedImage_1.png

I've even tried just displaying one of the values in a calculated control to see if anything comes up but nothing.

What I have tried:
=ParseLookup("Control Name")

=ParseLookup("Value Field")

=ParseLookup("Display Field")
="Control Name"

="Value Field"

="Display Field"

All of the above with and without Quotes... Tried changing display mode which apparently caused some issues for other users, old posts though. 

214416_pastedImage_3.png

Parameters are passed in from form controls and Workflow variables, I just hard coded the above for testing purposes.

What am I missing or doing wrong..?


4 replies

Userlevel 5
Badge +14

unfortunately SQL request control is not supported in runtime functions.

see dosumentation - https://help.nintex.com/en-US/nintex2016/current/#sp2016/Forms/Designer/FormulaBuilder.htm 

Badge +6

Thanks Marian, there has to be a way to see the value returned though I've seen other examples where people have used the value returned in form rules to validate fields or to calculate values, exactly what I'm trying to do.
refer: Nintex Forms Enterprise - SQL Request Control |  

Could it be because I am using Responsive forms as opposed to classic form?

Userlevel 5
Badge +14

that seems to be matter of use. and that's likely why it is not generally supported.

examples you provides reacts just on sql request control selection change, which seems to works.

you however just reads a value from DB that's never change. DB call is asynchronous and (usually) finishes later than calculated control is evaluated, so it doesn't updates/recalculates formulas.

it looks like you have configured sql request controls in display mode or disabled for edit. you may try to change them to be editable whether it fires a change event once they are populated from DB. but I'd say it will not help at all.

Badge +6

So I've recreated the functionality using Classic Forms instead of Responsive Forms and viola, calculations work as desired. Very sad I'll have to use a classic form for the Approval tasks, will log a ticket with support to see if this can be addressed. 

Reply