1
0
-1

Hi,

our on-boarding forms interact with our back-end system after the form is completed, however, some submissions fail due to data errors. In this case 'retry delivery' will not succeed because the data is still in error.

Is it possible to recover the form xml from the original submission and open a new form that uses the original form xml as its form xml?. If this is possible it will save us/customers from opening a new blank form and having to repeat all the data entry.

We know the tracking code of the original form, so I'm wondering if I can use TxnQuery().setTrackingCode(OldCode) and get the form xml from there, then use that to populate the new form.

Any guidance would be appreciated.

Thanks

Mark

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Mark

      To update the form xml can you try?:

      Txn oldTxn = new TxnQuery()
      		.setTrackingCode(OldCode)
      		.firstValue()
      
      
      new TxnUpdater(newTxn)
      	.setFormXml(oldTxn.formXml)
      	.update()


      Please confirm if that works for you.

      Regards
      Rado



      1. Mark Murray

        Hi Radoslav,

        thanks for the suggestion; that looks very simple.

        However, I wonder where would I put this code?

        Would it go in prefill? does the newTxn exist yet in prefill?

        I'll explore this and let you know?

        Thanks

        Mark


      CommentAdd your comment...