Add a new column having values dependent on another column

I am haivng two columns “Number” and “Qty” and want to update the status column according to the “Qty” column i.e. if Qty = 0 or blank => Status = No else Qty = yes .
Here is the sample file .
Can anyone help please.
Sample.xlsx (8.2 KB)

image

@Soniya215

  1. Read the Excel File
  2. Use For Each to Loop through the Datatable
  3. Inside the Loop Use an If Condition to check for your condition
  4. Update Status = ‘No’ if Condition Satisfies, else Update Status = ‘Yes’
1 Like

@Soniya215 @supermanPunch

I agree with @supermanPunch, but small correction, Use For Each Row to loop through the datatable

Thanks

@Srini84 Yes , I missed ‘Row’ over there :sweat_smile:

Thanks for the reply @supermanPunch @Srini84. I have tried the workflow Main.xaml (11.8 KB) can you please check what should i change in it because it is not working.

@Soniya215 Add this Condition to your if:
not ( row(“Qty”).toString.Trim=“0” or String.IsNullOrWhitespace(row(“Qty”).toString.trim))

Remove your Condition and Add this

Remove Build Datatable as well :sweat_smile:

@Soniya215 Just Check this :sweat_smile: UpdateStatus.zip (12.7 KB)

Thanks a lot for the help @supermanPunch :slightly_smiling_face:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.