1
0
-1

Hi joget team!

I am trying to pass parameters based on the form fields which is not working. If I pass actual values in ' ' it works fine. however when I reference hash values it does not..

CALL UpdateStatus('#form.VendorInvoiceProcess.Portal_id#', 'Submit2')

the form id is VendorInvoiceProcess and the field is Portal_id.

how should I structure the call?

Thanks - Tony

 

 

 

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      Are you using the hash variable in a form that belongs to a process instance?

      If no, then you have to define the record id for the form data hash variable.

      1. Anthony Sica

        Hi - I am using the form within a process instance. the process instance name id is : UploadPortalInvoices I also tried calling as : CALL UpdateStatus('#form.UploadPortalInvoices.Portal_id#', 'Submit2')

      2. Chris Angel

        https://dev.joget.org/community/display/KBv6/Hash+Variable#HashVariable-FormDataHashVariable I just noticed that your format seems incorrect. You need the table name of the form you are pointing to. Refer to the KB link attached.

      3. Anthony Sica

        Thank you Chris - I formatted it with the table name and it works... #form.tableName.fieldId # Cheers - Tony

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Form Data Hash Variable is "seek by ID" basis. So if you using this hash inside the process which mean you create Tools in process then use Database update tool plugin, you can refer to hash variable by your syntax because  record ID in.

      But if you Database Update tool plugin was use without process like Post Form Submission Processing or anywhere else, you must refer record id in "[ ]"

       

      Here is example SQL (in SQL Server)

      DECLARE RequestID NUMBER := 0;Sts NUMBER := 0;
      BEGIN STORE_PROCEDURE_NAME (RequestID,Sts,'#form.sym_OR_JOB.or_ref_project[{variable.or_uuid}]#');
      END;

      1. Anthony Sica

        hmm. I am afraid I dont understand how to pass parameters in your example...how do I pull the ID and Status?

      CommentAdd your comment...