Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Flex + Multiple Routes, which button clicked?

Avatar

Level 4
I have a User Task (which uses a Flex form) in workbench which has 2 defined routes leading out of it, Approve and Reject. If Accept, a bunch of validation should occur. If Reject, no validation is needed.



When the user clicks on either of these buttons in the bottom of Workspace, I receive an event within Flex, which typically kicks of my validations. But, both buttons fire off this event and I don't see any way of telling which of the 2 buttons was clicked.



Anyone have an idea
0 Replies

Avatar

Not applicable
Hello,



At your PDDF form you have controls loke this : AWS_SUBMIT, AWS_ACTION, AWS_PROCESSTYPE etc.

AWS_SUBMIT it is button, you can put some javascript code on it's onClick event , which will make youre validation.

Example:

prodata.AWS_SUBMIT::click - (JavaScript, client)



// This is the AWS_SUBMIT click script

if (xfa.host.name == "Acrobat")

{

//validation

if (prodata.AWS_ACTION.rawValue == "Cancel"){

data.main.field.validate.nullTest = "";



}

if (prodata.AWS_ACTION.rawValue == "Approve"){

data.main.field.validate.nullTest = "Error";



}

Avatar

Level 4

Not using PDFs, using Flex.

I think the answer is you have to do it yourself.

  1. Only 1 route out of the Assign Task.  This is Complete Task
  2. Create a Decision Point which routes based upon data provided in the XML provided by the form.