How to evaluate local variable %value% in BPM?

I am attempting to create a UBAQ w/ BPM that will provide multi-site PO Approval for a single user. So far, I have the BPM working and it approves the POs, but it still generates a Query Execution Message.

I am using DevTools to try and understand what is happening. It appears that on the PO Approval Form, when the approver selects Accept, the Approved Amount defaults to the PO Amount. From there, if the approver wants to adjust the amount, then that new value is stored in the %value% variable. There is a condition check that evaluates [%value% < POAmt] and if true, throws an error. This is the error I receive in the query.

In my UBAQ/BPM, I do not know how to handle this condition check. Where in my UBAQ or BPM would the %value% variable return from? Or, since the process executes successfully and the POs approve, should I ignore the error?

You’ve got your answer right there!!

From what I can tell %value% is the value on the current row. I’m sure there’s another event that assigns ApvAmt to %value%, but that’s strictly App Studio stuff. Anything you do in a UBAQ should be the AprvAmt DB field.

1 Like

Yep, I saw that field but that value updates before the PO is officially approved when selecting Save on the form. In my BPM, I am updating the ApvAmt with POAmt, but it doesn’t seem to be enough to satisfy the condition check. Any other ideas?

Also, it was your debugging post that got me this far. A big thank you for making that post, and for helping now :clap: :star_struck:

Check your variables to see if there’s an ApvAmt in there somewhere.

image

1 Like

No, there wasn’t a variable for ApvAmt. With your prompt, I went in and added it for test. My PO approved successfully but I still received the error.

Also, my message just before the Update is shown below. It clearly shows that ApvAmt=POAmt, so it’s still baffling why the condition check fails.


image

What error are you getting? I’m not sure I saw it.

I’m calling it an error, but perhaps that may not be the best term. Or maybe it is, I’m not sure. This is what displays in the UBAQ after Updating:

Here is the section from debugging when using the PO Approval form: