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

Question

Question

Submit/Approve in one step in Forms 9.1.1

asked on September 11, 2014

 

I am working on a variation of the use case where a supervisor fills out a form and essentially approves the form when they submit it.  I am trying to do this by comparing two User Id fields on the form.  One field is the system identified "current user", the other is a field that gets its value from a lookup rule based on department.  The external table has a list of approvers grouped by Department.

 

The idea is if a supervisor is filling out a form, he/she could pick their name from the approvers list.  In the exclusive gateway the Approver field would then be compared against the current user,  if they are the same routing goes one way,  if they are not equal it goes another way.

 

Currently the result is that the process fails at the gateway.  Can you not compare two fields in a form to make a routing decision in a gateway?

 

Attached are screen shots of the form, the workflow, and the code in the gateway.

1 0

Replies

replied on September 11, 2014

I don't think it was intended to work that way. Great feature request though.

 

We do something with our workflows to do the same thing with supervisors. So it looks to see if a supervisor submitted the form or someone else. If it is someone else it goes to the supervisor for approval. If it was the supervisor we pass it on to HR. The way we do it is we do a database lookup based on the user submitting the form and pull back their position from our HR software. Then at the gateway, we have it look to see if the submitter's position matches 1 of 10 values.

1 0
replied on September 11, 2014

Why not do that in the form with a hidden field?

 

Just set the dropdown field to cause a javascript function to initiate whenever it is changed. Then, retrieve the value from that field and the other field you wish to compare and do the comparison in javascript. You would then store the value to a hidden field. 

 

You would then use that value in your comparison. 

0 0
replied on September 11, 2014

I see another option as well, why not create a stored procedure that returns all lines except the line that has that users account in it? This way they never can choose themselves.

0 0
replied on September 15, 2014

Hi Mark, 

 

If your question has been answered, please let us know by clicking the "This answered my question" button on the appropriate response.

 

If you still need assistance with this matter, just update this thread. Thanks!

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

Sign in to reply to this post.