If column name consist input value then update column status as update required

I have one input value inputStr which i want to search in column “HRname” if exist then update column Status as result1Str else result2Str and column reference as referencestr.

Suppose required all strings are
Column Name- HRname
inputStr- HR
result1Str- “HR name found”
result 2Str-“”
referencestr-“Yes”

Note- given required values can be changed and Dt contains more than 50 columns i have just provided 5-6 columns.

Screenshot_20220323-151559__01

Required output:

@Mansi_Mhatre

  1. Use Read Range activity to read the data from Excel file and it will give output as DataTable. Let’s say dtInput

  2. And then use For Each Row activity.

      ForEach Row in dtInput
         row("HRName").ToString.Equals(inputStr)
         Then 
             row("Remark") = result1Str
             row("Reference") = referencestr
          Else
              row("Remark") = result2Str
    
  3. And then use Write Range activity and pass dtInput to write it back to excel file.

It consists more than 50000 data so required different approach.

give a try on get it computed by defining the datacolumn expression for the remark column

Expression would look in a direction like:

"IIF([HRName]='" & strCheckVar & "', 'YES','')"

Find starter Help here:
DCExpression_SetConditionalValue.xaml (7.0 KB)

How to check contains condition i have data with extra part.
Screenshot_20220323-153958__01

What if input string is only Axis…so i want contains property.

then it is a different requirement. So just clear all requirements to a final set. Based on this we will check the solution approach options

https://forum.uipath.com/t/re-how-to-filter-one-column-with-input-value-and-update-value-of-other-column-without-loop-and-it-should-return-original-datatable-not-filtered-datatable/408627/11?u=mansi_mhatre

Please look into this issue.

Here previous solution is working for only if no duplicate values found in input column but there will be duplicate values.
Like input value is PM which i want to search in both EmpDesig column as well in ManagerDesign column.


Pm already added in dictionary of tuple key it is giving error.

link is broken