Update DataTable Field from Field in Same Row

HI All

I have the following if Statement


image
image

I have tried various permutations of the in and out assign but cant get the “Name” Filed to update

Could someone advise what syntax I need to use please?

Thanks in advance

Dave

Hi @ieptus

The syntax seems correct, the if condition always returns true as it is an hard coded value, and is the company column has values in it.

and have you write back the datatable back into the excel.

Thanks

HI Thanks for the reply

The data look like this

Name Company
Acme
FRED

The write to excel produces the same data as the input

I meant that the Input sheet = the output sheet, no change

@ieptus thanks i can see that the name column has values and company column is empty, so could you share the input excel data and the required output you want.

Thanks

@prasath_S

image

The idea is if the name is blank then the company will replace the name

Thanks for looking by the way

Hi,

As per your work flow screenshot you are checking like if name column is empty you are taking the value from city and enter that value in the name field.

I think your output showing correct I guess. Since name field is not empty it didnot take any vale from city.

Change your input data( leave some blanks in the name field and add some values in city against those columns) to test your process. Thanks.

1 Like

For this input may I know what is the output you are getting by using your process.

@kirankumar.mahanthi1

Should the If statement be Inside the For each loop? Currently is it reading the datatable?

Hi @ieptus

it should be something like this,

Thanks

1 Like

you are correct buddy. :slight_smile:

1 Like

you are right my friend you got the answer for your question.

@kirankumar.mahanthi1 thanks i missed at the first post, that it will return false so it will not anyways went to then, think you got that great.

Thanks

your most welcome @prasath_S . you did not missed though you have provided correct answer always.

1 Like

@prasath_S @kirankumar.mahanthi1

Ah that makes sense, thank you both for your assisatance

Will run a test now

Dave

your welcome @ieptus anytime.

Ah, so ran the change, the workflow goes down the Else path which means that it thinks the is not null??

@prasath_S @kirankumar.mahanthi1

Apologies, didnt check that properly, the output is spot on :slightly_smiling_face:

Thanks again guys

Dave

2 Likes

@ieptus glad that helped…

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