1
0
-1

Dear Expert,

 

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.

 

 

    CommentAdd your comment...

    5 answers

    1.  
      2
      1
      0

      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?

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

        Hi Andrew,

         

        Sorry for the late reply.

        Thank you for the sample and explanations.

        The form is working as expected now. (smile)

        I missed out the hidden field.

         

        Regards,

        Shubana.

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

          Hi Shubana

          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 (smile).

           

          APP_Shubana.jwa

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

            Hi Chris,

            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?

             

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

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

                CommentAdd your comment...