Skip to content

Get Value Action: getValue

The getValue action in the PDF File Handler function is used to extract the value associated with a specific key from a PDF file. This feature is especially helpful when working with structured data in PDFs, such as forms or reports.

Example: You have a PDF named SampleReport.pdf, and you need to extract the value Person ID found on pages 1 to 5.

Steps to Configure:

  1. Add a new step.
  2. In the automation configuration, choose Set a Variable Value from the Action dropdown.
  3. Enter a name for the variable in the Element Key field (e.g., ExtractedValue). This variable will store the output.
  4. Navigate to the parameter section and click Form.
  5. From the dropdown, select Functions and choose PDF File Handler Functions.
  6. Select getValue from the Action dropdown and configure the following fields:
    • FPath: Specify the path to the target PDF file (e.g., C:\Documents\SampleReport.pdf).
    • Start: Indicate the first page to scan (e.g., 1).
    • End: Indicate the last page to scan (e.g., 5).
    • Key: Provide the key for which the corresponding value needs to be extracted (e.g., Person ID:).
    • LineNumber: Provide the line number from the pdf if user knows on which line the desired data is available or leave it as blank.
    • Occurrence: If the given key happens to appear multiple times in the given pdf file which occurrence data the user wants, provide 1, 2 or 3 etc. to get the desired occurrence data.
  7. Click Save.
scrn-get-value-command-tabular-view
Tabular View
getValue Command - Card View
Card View

Outcome on execution:

  • The value corresponding to the provided key (e.g., 1111505390) is retrieved from the defined pages of the PDF and stored in the specified variable. This allows easy access and use in subsequent automation steps.
  • This variable can be referenced in subsequent steps of the automation process using the syntax ${VariableName} (e.g., ${ExtractedValue}).
scrn-outcome-on-execution-sample-output
Sample Output

Notes:

  • The key provided should match the format as it appears in the PDF (case-sensitive).
  • If the key is not found within the specified range, the variable will remain empty.

Back To Top