8 Replies Latest reply on Feb 8, 2011 1:42 AM by Abhinav Sharma

    User Actions for selecting routes.

    Abhinav Sharma Level 2

      Hi,

       

      I need to validate some fields in the PDF form depends on the Action the user has selected. On selecting One action I have to validate one field on another action it should validate other. How can I achieve it ? How to see which Action the user has selected ?

       

      uAct1.jpg

       

      Thanks.

       

      -

      Abhinav

        • 1. Re: User Actions for selecting routes.
          The Flex Viking Level 1

          I don't believe this is possible in 8.2.

           

          I thought this issue had been fixed in 9.X.

           

          What version are you using?

          • 3. Re: User Actions for selecting routes (Handle Validations)
            $Nith$ Level 4

            This is definitely possible.

             

            Write a validation script on preSubmit event of the form.

             

            AWS_ACTION will have the selected status.

             

            you can prevent submission (if some validation fails) by the following expression:

             

            xfa.event.cancelAction = true;

             

             

            Nith

            1 person found this helpful
            • 4. Re: User Actions for selecting routes (Handle Validations)
              Abhinav Sharma Level 2

              Hi Nith, Thanks for your reply.


              I am having a problem in applying your approach. I havn't use AWS_ACTION till now. So don't know how to use it.


              I created a new form (xdp), Workspace enabled, put a submit button (named it 'AWS_ACTION'). On Button's preSubmit event I try to check the AWS_ACTION value.

               

              app.alert("AWS Value: " + AWS_ACTION.rawValue );
              xfa.event.cancelAction = true;
              

               

              In workspace, I have 2 routes. I am getting the null value when selecting anyone of the route. I have tried it on form's preSubmit event. Still same result.

               

              Pls tell where I am doing it wrong.

               

              Thanks.

               

              -

              Abhinav

              • 5. Re: User Actions for selecting routes.
                $Nith$ Level 4

                put a submit button (named it 'AWS_ACTION').

                 

                The above action is wrong. You must drag the "Process Fields" item from Custom Component category (from Object Library)

                 

                Once you drag it into the form, you will notice several fields added to the form including the AWS_ACTION field.

                 

                Hope that helps!

                 

                Nith

                 

                 

                 

                Nithiyanandam Dharmadass

                 

                Ministry of Finance

                Tel. +973 17575809

                nith@mof.gov.bh

                www.mof.gov.bh

                P.O Box 333, Manama, Kingdom of Bahrain

                 

                Please consider the environment before printing this email

                1 person found this helpful
                • 6. Re: User Actions for selecting routes.
                  Abhinav Sharma Level 2

                  Thanks.

                   

                  I am now trying with Process Fields but getting some error while initiating process in workspace. Compete button is not showing when the form is first opened, with the below error:

                  ' The form associated with task 1510 has multiple submit buttons so the Workspace Complete button will be disabled.  Click the appropriate button on the form to submit it. '

                   

                  I am looking into it. Will update you.

                   

                  -

                  Abhinav

                  • 7. Re: User Actions for selecting routes.
                    $Nith$ Level 4

                    Do not place your own submit field because the Process Fields collection will hold a submit button for you.

                     

                    I hope removing your submit button will solve the current problem.

                     

                    Nith

                     

                     

                    Nithiyanandam Dharmadass

                     

                    Ministry of Finance

                    Tel. +973 17575809

                    nith@mof.gov.bh

                    www.mof.gov.bh

                    P.O Box 333, Manama, Kingdom of Bahrain

                     

                    Please consider the environment before printing this email

                    • 8. Re: User Actions for selecting routes.
                      Abhinav Sharma Level 2

                      I was checking the issue. I found that there are 3 Buttons in process fields:

                      • AWS_SUBMIT : Control Type - Regular, Visible
                      • FSSUBMIT_    : Control Type - Submit, Hidden
                      • PDF_SUBMIT  : Control Type - Submit, Hidden

                       

                      So I think the problem is due to later two buttons (FSSUBMIT_ & PDF_SUBMIT). Both are of Submit type. So workspace not able to recognize which one to use to submit.

                       

                      I changed the above to: (not using my submit button)

                      • AWS_SUBMIT : Control Type - Submit, Visible
                      • FSSUBMIT_    : Control Type - Regular, Hidden
                      • PDF_SUBMIT  : Control Type - Regular, Hidden

                       

                      Trying this COMPLETE Button now become visible. Now it is able to recognize the routes.

                       

                      Thanks a lot.

                       

                      -

                      Abhinav

                       

                      Message was edited by: Abhinav Sharma