Set PDF Form Fields Dynamic
  • 12 Jan 2023
  • 1 Minute to read
  • Dark
    Light

Set PDF Form Fields Dynamic

  • Dark
    Light

Article summary

Step Details

Introduced in Version4.0.0
Last Modified in Version7.12.0
LocationData > PDF

The Set PDF Form Fields Dynamic step passes in a list of DataPairs where the Name is the Field Name, and the Value is an Object and updates a PDF FileData with those values.




Properties

Inputs

PropertyDescriptionData Type
Field DataNames and Values of the Fields to set within the PDF file. List of DataPair
PDF FileFile to set PDF fields on.FileData

Outputs

PropertyDescriptionData Type
PDF FileFile using the newly set PDF fields.FileData

Example Inputs and Outputs

Field DataPDF FileOutput
List of Data PairA PDF FileSuccessful PDF Output
NullA PDF FileEXCEPTION MESSAGE
List of Data PairNullEXCEPTION MESSAGE
Empty List of Data PairA PDF FileSuccessful PDF Output
List of Data PairCSV File or Excel File, or any file type other than PDFEXCEPTION MESSAGE


Common Errors

Field Data cannot be null

The Field Data property must have Input Data, or the step will fail with the following Exception Message.

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Set PDF Form Fields Dynamic 1[SetPDFFormFieldsDynamic] in flow [Display Steps]: Field Data cannot be null.
 ---> DecisionsFramework.LoggedException: Field Data cannot be null.
   at DecisionsFramework.Design.Flow.CoreSteps.SetPDFFormFieldsDynamic.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace

PDF File cannot be null

The PDF File property must have Input Data, or the step will fail with the following Exception Message.

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Set PDF Form Fields Dynamic 1[SetPDFFormFieldsDynamic] in flow [Display Steps]: PDF File cannot be null.
 ---> DecisionsFramework.LoggedException: PDF File cannot be null.
   at DecisionsFramework.Design.Flow.CoreSteps.SetPDFFormFieldsDynamic.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---

Incorrect File Header

This step requires a PDF file; if any other file type is used as the PDF File input, the following error will occur. 

To correct this, use a PDF file.

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Set PDF Form Fields Dynamic 1[SetPDFFormFieldsDynamic] in flow [Display Steps]: Incorrect file header ---> Aspose.Pdf.InvalidPdfFileFormatException: Incorrect file header
   at #=zrx8$vGff8rw0zOsJfXBx6dl$eHVthdMYUw==.#=zELiBKk0nn$NI()
   at #=zrx8$vGff8rw0zOsJfXBx6dl$eHVthdMYUw==..ctor(Stream #=zA6ZEq1c=, String #=zkZxG5Dc=, Boolean #=zFRe3SoGTg5hA)
   at Aspose.Pdf.Document.#=zyoo3pL0=(Stream #=z3RtBOxU=, String #=zkZxG5Dc=)
   at Aspose.Pdf.Document..ctor(Stream input)
   at DecisionsFramework.Utilities.Data.PDFUtility.GetPdfDocument(Stream stream)
   at DecisionsFramework.Utilities.Data.PDFUtility.GetFieldNames(FileData file, PdfFieldNameSortingMethod sortingMethod)
   at DecisionsFramework.Design.Flow.CoreSteps.SetPDFFormFieldsDynamic.Run(StepStartData data)
   at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData)
   at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) 
   --- End of inner exception stack trace ---

Was this article helpful?