activities
latest
false
UiPath logo, featuring letters U and I in white

Workflow Activities

Last updated Dec 20, 2024

LookUpDataTable

This method emulates the behaviour of the VLOOKUP Excel formula. It enables you to search for a provided value in a specified DataTable and returns the RowIndex at which it was found. If the provided value is not found, then the returned RowIndex is -1. This method can also help you return the value found in the cell that has the row coordinates specified in the RowIndex parameter and the column coordinates specified in the Target Column property category.

Definition

Namespace: UiPath.Activities.System.API

Assembly: UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

Overloads

  
LookUpDataTable(DataTable, String, String, String)It enables you to search for a provided value in a specified DataTable and returns the RowIndex at which it was found.
LookUpDataTable(DataTable, String, String, String, Int32)It enables you to search for a provided value in a specified DataTable and returns the RowIndex at which it was found, and allows you to input the row number of the found cell.

LookUpDataTable(DataTable, String, String, String)

It enables you to search for a provided value in a specified DataTable and returns the RowIndex at which it was found.
Object LookupDataTable(
	DataTable dataTable,
	string lookupValue,
	string lookupColumnName,
	string targetColumnName
)Object LookupDataTable(
	DataTable dataTable,
	string lookupValue,
	string lookupColumnName,
	string targetColumnName
)
dataTable DataTable
The DataTable in which the lookup is performed.
lookupValue String
The value you want to search for in the DataTable.
lookupColumnName String
The name of the column you want to search for in the DataTable set above.
targetColumnName String
Returns the value of the cell found at the coordinates between this column and the value from the RowIndex parameter. If the target column is not set the cell value is null.

LookUpDataTable(DataTable, String, String, String, Int32)

It enables you to search for a provided value in a specified DataTable and returns the RowIndex at which it was found, and allows you to input the row number of the found cell.
Object LookupDataTable(
	DataTable dataTable,
	string lookupValue,
	string lookupColumnName,
	string targetColumnName,
	out int rowIndex
)Object LookupDataTable(
	DataTable dataTable,
	string lookupValue,
	string lookupColumnName,
	string targetColumnName,
	out int rowIndex
)
dataTable DataTable
The DataTable in which the lookup is performed.
lookupValue String
The value you want to search for in the DataTable.
lookupColumnName String
The name of the column you want to search for in the DataTable set above.
targetColumnName String
Returns the value of the cell found at the coordinates between this column and the value from the RowIndex parameter. If the target column is not set the cell value is null.
rowIndex Int32
The Row index of the found cell, stored in an Int32 variable. If the provided value is not found, the Row index is -1.

Return value

The value found in the cell that has the Row coordinates specified in the RowIndex property and the Column coordinates specified in the Target Column property category. The output type matches the source data type.

Was this page helpful?

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