Joget DX Beta Available for Download
Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.
I am unable to populate AJAX Subform value into form grid.
Below is my workaround :
1) Form A has Form Grid. Form Grid Columns are voucherNo, Date, GSTAmount,TaxAmount,Amount.
Form Grid is mapped to Form B.
2) Form B has selectbox which is using Default Form Options Binder. I have added AJAX subform and mapped it Form C which has Date, GSTAmount,TaxAmount,Amount. Ajax Subform's Store Binder is Parent Form Binder.
3) Whenever i change voucherNo, (Date, GSTAmount,TaxAmount,Amount) also changes as expected.
4 ) But, the moment I click submit in Form B. voucherNo is populated in form grid with the ID instead of the value. The other columns (Date, GSTAmount,TaxAmount,Amount) remains empty. But, when I view the form B, all the fields are filled up.
Please advise on this. I am also open to any other suggestions.
strangely, the sample did not work as expected; after "submit" the total amount shows 0.
I simply imported the app and ran, did not change anything.
is there anything I am supposed to do after import?
Sorry for the late reply.
Thank you for the sample and explanations.
The form is working as expected now.
I missed out the hidden field.
Attached is a sample working app to mimic your "Form > Form Grid > Ajax Subform" requirement.
First, create some sample voucher records in menu "Reference Lookup". This is the setup table.
Then add your records in menu "Manage Records" and it will reference the setup table to pull the "TotalAmt" (You can add more fields accordingly).
The child form, which I named 'Form B' has a hidden field to store the "TotalAmt". Name the field the same as the Ajax subform. Joget Workflow will then store the Ajax lookup data into your child (form grid) record.
Hope this explanation and app helps you .
Currently, below is my table structure :
Form A= tcsh_float_claim
Form B= tcsh_float_entry.
Form C= tcsh_petty_claim.
At the moment, only voucherNo is created in tcsh_float_entry.
I am expecting Date, GSTAmount,TaxAmount,Amount columns to be created in tcsh_float_entry too.
Do you have any samples for this problem?
Seems like fields in your AJAX subform is not accessible to the form grid.
A possible solution could be: when submitting form B, save it to a separate table. After then, form A can retrieve from that table rather than attempting to reference '2 tables deep'.
Powered by a free Atlassian Confluence Open Source Project License granted to Joget Workflow. Evaluate Confluence today.