You are viewing limited content. For full access, please sign in.

Question

Question

Compare Currency Variables in Path Condition

asked on October 22, 2014

I have a form that allows a employee to submit an invoice to Finance for approval.  The initial form uses the current user to lookup that user's maximum approval level from a SQL database and puts it into a currency field.  The user then inputs the invoice amount into another currency field prior to submitting.  I then have an exclusive gateway that compares those two currency variables. If the invoice amount is less than or equal to their maximum limit it goes directly to Finance but if it is over their maximum limit then it goes to their supervisor for approval.  The issue I am having is that no matter what the invoice or submitter value is it is going to the supervisor for approval.  I've seen where path conditions can be used to compare 2 number values but can it also be used to compare currency or is that not an option yet?

Here are my path conditions:

  1. Supervisor Approval
    • /dataset/Approval_Limits/Submitter_Limit</dataset/Invoice_Information/Invoice_Amount
  2. Directly to Finance Approval
    • /dataset/Approval_Limits/Submitter_Limit>=/dataset/Invoice_Information/Invoice_Amount
0 0

Answer

SELECTED ANSWER
replied on October 22, 2014 Show version history

It appears that the comparison is being done with the ascii value instead of the numerical value of what's in the currency fields. We're looking into the matter.

 

*Edit*

Right now you can workaround the matter by using

number(/dataset/Approval_Limits/Submitter_Limit)<number(/dataset/Invoice_Information/Invoice_Amount)

and

number(/dataset/Approval_Limits/Submitter_Limit)>=number(/dataset/Invoice_Information/Invoice_Amount)

respectively.

0 0

Replies

replied on October 22, 2014

Follow up on this. The submitter's limit is $500.00 and the amount they are submitting is $53 and it incorrectly goes to their supervisor.  If it is $100.00 or more then it compares them correctly.  If the 2 values that are being compared have the same amount of dollar digits then is seems to compare them correctly.  Thus it works correctly if the invoice amount is anywhere between $100.00 and $999.99 but fails when the dollar portion has either more or less digits.  It fails in testing when the invoice amount is $1000.00 or more with this limit.  Should I just not be comparing currency's in Forms 9.2 or is there a different way to handle this (besides custom javascript that I know could do the comparison in the form)?

0 0
replied on October 27, 2014

Great.  I've already written the javascript for that customer but will try this the next time it comes up.  Thanks for the help.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.