studio-web
latest
false
UiPath logo, featuring letters U and I in white

Studio Web User Guide

Last updated Aug 26, 2025

The Validation Control variable

Each Validation Control automatically creates a variable inside the app. This variable holds the document data and you can use it in other parts of your app or automation.

The variable name follows the syntax Var<ValidationControlName>_<PageName>, for example VarValidationControl_MainPage.

The Validation Control variable allows both reading from and writing to the Validation Control.

Apps automatically manages this variable:

  • Creates the variable when you add the Validation Control onto the canvas.
  • Renames the variable when you rename the control.
  • Deletes the variable when you remove the control.
  • Prevents you from manually deleting or modifying this variable, since it is protected.
  • Provides usage across different app pages, as the variable is app-scoped.

Variable properties

The Validation Control variable includes several properties you can reference or bind:
  • Taxonomy—Holds document schema, field definitions, and labels.
  • ExtractionResult—Contains extracted field values, raw and validated.
  • SelectedDocumentType—The active document type shown in the control.
  • SelectedField—The field currently selected by the user.
  • BusinessRules—Status of field-level validation rules.
  • IsValid—Boolean flag to override control validity.
  • DataSource—Holds the original ContentValidationData object.

Reading data

To read the current state of the Validation Control content, use the following expressions:
  • Getting the extracted results
    VarValidationControl1_MainPage.ExtractionResultVarValidationControl1_MainPage.ExtractionResult
    
  • Getting the selected document type

    VarValidationControl1_MainPage.SelectedDocumentTypeVarValidationControl1_MainPage.SelectedDocumentType
    
  • Getting the selected field and its values

    VarValidationControl1_MainPage.SelectedField.FieldValue.ValueVarValidationControl1_MainPage.SelectedField.FieldValue.Value
    
    VarValidationControl1_MainPage.SelectedField.FieldValue.ConfidenceVarValidationControl1_MainPage.SelectedField.FieldValue.Confidence
    
  • Getting taxonomy fields (useful for dropdowns)

    VarValidationControl1_MainPage.Taxonomy.GetFields(VarValidationControl1_MainPage.SelectedDocumentType).ToListSourceVarValidationControl1_MainPage.Taxonomy.GetFields(VarValidationControl1_MainPage.SelectedDocumentType).ToListSource
    

  • Reading a table field value

    VarValidationControl1_MainPage.ExtractionResult.GetTableFieldValueByTableName("Invoice Items")(0)(0).ValueVarValidationControl1_MainPage.ExtractionResult.GetTableFieldValueByTableName("Invoice Items")(0)(0).Value
    
    
    Where (0)(0) represents the cell at the intersection of the first column and the first row of the Invoice Items table.
Refer to Document Understanding documentation for each class definition and properties.

Writing data

To edit the values inside the Validation Control, use the Set Variable Value activity and reference the variable:

  • Setting a field value in the To variable field
    VarValidationControl1_MainPage.Field("Patient Name").ValueVarValidationControl1_MainPage.Field("Patient Name").Value
    
    Set value field: John Doe.
  • Setting focus on a table cell value

    VarValidationControl1_MainPage.Field("Invoice Items").Field("Description", 0).SetFocus = trueVarValidationControl1_MainPage.Field("Invoice Items").Field("Description", 0).SetFocus = true
    Where ("Description", 0) represents the cell at the intersection of the "Description" column and the first row of the Invoice Items table.
  • Setting confidence or confirm flags

    VarValidationControl1_MainPage.Field("Patient Name").Confidence = 0.95VarValidationControl1_MainPage.Field("Patient Name").Confidence = 0.95
    
    VarValidationControl1_MainPage.Field("Patient Name").Confirm = trueVarValidationControl1_MainPage.Field("Patient Name").Confirm = true

  • Updating a multi-value field

    VarValidationControl1_MainPage.Field("Diagnosis Code", 2).Value = "E11.9"VarValidationControl1_MainPage.Field("Diagnosis Code", 2).Value = "E11.9"
    
    Where 2 represents the row number in the Diagnosis Code column.
  • Deleting a field value

    VarValidationControl1_MainPage.Field("Vendor Name").DeleteValueVarValidationControl1_MainPage.Field("Vendor Name").DeleteValue
    

  • Updating a table cell

    VarValidationControl1_MainPage.Field("Invoice Items").Field("Description", 0).Value = "50.00"VarValidationControl1_MainPage.Field("Invoice Items").Field("Description", 0).Value = "50.00"
    
    Where ("Description", 0) represents the cell at the intersection of the "Description" column and the first row of the Invoice Items table.
  • The Validation Control variable
  • Variable properties
  • Reading data
  • Writing data

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo
Trust and Security
© 2005-2025 UiPath. All rights reserved.