7 Replies Latest reply on Jan 15, 2008 8:24 AM by Jasmin Charbonneau

    Convert xfaform variable to document type

      I have a simple requirement to convert the xfaForm type which is used to invoke the process in task manager to document type varibale.

      The form developed is not following any xsd schema. But I want to read value assign into various form feild during the various operation of the process.

      Is there any way by wchich I can do it. My intention to convert it into document type so that I can use export data and get the desire values but I am very much stuck up with the conversion from xfaForm to document type itself.
        • 1. Re: Convert xfaform variable to document type
          Jasmin Charbonneau Level 4
          You don't have to convert into document type to get the data. The xfaForm variable will contain the data for your form. The following xPath /yourxfaForm/object/data gives you the data for the form.

          You can also use /yourxfaForm/object/data/datasets/data/yourStructure/yourFieldName to get to the field directly.

          You can also use /yourxfaForm/object//data/yourFieldName. The "//" will make a search in all the data to find the tag matching your field name.

          If, for whatever reason you need to convert it into a document, then you'll need to use the RenderPDFForm operation from the Forms service.

          Jasmin
          • 2. Re: Convert xfaform variable to document type
            Level 1
            Thanks Jasmin,

            But as I mentioned my Form is not bound to any struture. So in the set struture I can have access to /process_data/myForm/object/data/xdp/datasets/data/FSFIELDS_

            Lets say I have simple form with having a text field with the name myname and its not bound to any struture xsd. I want to access the field value of myname in Set Value operation then what the struture in need to follow.
            • 3. Re: Convert xfaform variable to document type
              Jasmin Charbonneau Level 4
              You don't need a xsd to be able to parse your form structure from xPath.

              You can also use /yourxfaForm/object/data/datasets/data/yourStructure/yourFieldName to get to the field directly.

              You can also use /yourxfaForm/object//data/yourFieldName. The "//" will make a search in all the data to find the tag matching your field name.

              It'll follow the structure of your XDP. If in your hierarchy in Form Designer you have form1/SubForm1/MyField, then you should be able to use /yourxfaForm/object/data/datasets/data/form1/SubForm1/MyField.

              Jasmin
              • 4. Re: Convert xfaform variable to document type
                Level 1
                I tired both the options as described below.
                I have the following the structure of XDP form1/subform1/TextField1

                My Process having two components setValues and Variable Logger.

                Two varibales defined: myForm of Type xfaForm and myString of type String

                In the set value operation I tried reading and assigning the value of textfield1 as suggested in the following 2 manner.
                In setValue operation used
                1)Location /process_data/@myString Expression /myForm/object/data/datasets/data/form1/subform1/TextField1

                2)Location /process_data/@myString Expression /myForm/object//data/TextField1

                Result in the varible logger I always get the value of myString as null.
                Please suggest if I am doing anything wrong.
                • 5. Re: Convert xfaform variable to document type
                  Jasmin Charbonneau Level 4
                  Can you post the value of the xfaForm variable?

                  Jasmin
                  • 6. Re: Convert xfaform variable to document type
                    Level 1
                    Below is the value of both the variables from the varible Logger o/p

                    [PID:1,902] [ActionID:2,204] Action Name: "log0" Start...
                    [PID:1,902] /process_data/myForm - com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance: com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance@981b27

                    [PID:1,902] /process_data/myString: null
                    • 7. Re: Convert xfaform variable to document type
                      Jasmin Charbonneau Level 4
                      That doesn't' tell us much.

                      Can you put it in a document variable using a setValue and write that document variable to the file system using the Write Document operation.

                      You can use a setValue with the following:
                      /process_data/myDocVar - /process_data/myXMLvar

                      Jasmin