Database Update Tool - pass parameters for stored procedures

Confluence User - 03 Jun, 2019

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

 

 

 

database;update;forms;query

6


03 Jun, 2019
confluenceUser
1
confluenceUser

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.

04 Jun, 2019
confluenceUser
confluenceUser

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;

04 Jun, 2019
confluenceUser
confluenceUser

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')

04 Jun, 2019
confluenceUser
confluenceUser

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

04 Jun, 2019
confluenceUser
confluenceUser

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.

04 Jun, 2019
confluenceUser
confluenceUser

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

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print