1
0
-1

Is it a smart way to remove xml elements (bounded) on submit without using delivery process to manually remove the nodes?

    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Hi Kiki,

      I've always created a separate element called <ReferenceData> in seed xml and all the reference data elements such as suburbs, countries etc go underneath that as <ReferenceData><suburbData>a,b,c</suburbData></ReferenceData> 

      Then at submission or at submission completed service you can clear <ReferenceData/> element. The receipt and other services (delivery etc) will pick the data from each field that has user entered data. For example, suburb field will have chosen suburb but not other suburbs in a list.

       

      cheers,

      Parth

      1. Matthew White

        If you do this you need to make a distinction between saving and submitting because clearing on save may create problems when trying to open the saved form

      2. Unknown User (ppandya)

        Yes indeed. Most of the time we do this in submission completed processor.

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

      Are there not some intermediate steps where this could also be done such as submission preprocessor, submission completed etc - not necessarily recommending that.

      1. Miroslav Botka

        Hi Matt, quick answer is yes it can be done in the submission pre-processor. However you have to be aware of when the Receipt render server kicks in (after submission pre-processor, before delivery) and need to make sure the data in the removed node is not needed in when receipts are rendered. Also, in very specific (custom developed) scenarios receipts can be re-rendered even after delivery so a consideration for Kiki (and others) is whether it can be removed at all. My suggestion would be to go with a not bound - always calculate data field if possible but it really depends what data is stored (or calculated) in the element dicussed here.

      2. Matthew White

        We started looking at the options because if you use a prefill service to populate widgets such as updating a dropdown with a current list of suburbs then you pollute your xml with a list of suburbs and we wanted to remove that from the resulting xml.

      3. Miroslav Botka

        Hi Matt, the same applies to reference data for a DDL which is displayed in a receipt. If you remove the ref data, the DDL will lose its value when its rendered (in the receipt). However there are some workarounds for this.

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

      It seems the answer is no...they can either remove the nodes manually in the delivery service, or they can create xslt to restructure the xml to the way they desired.

        CommentAdd your comment...