Add data roww

Capture11

For first transaction it adds the item,
For second it throws the error

1 Like

No worries
kindly check with the variables passed to add data row has any value in it or not
we can check that by mentioning it in a write line activity so that we can find whether the output panel shows any value or not
Cheers @Sweety_Girl

1 Like

@Sweety_Girl,

May be one of the value in the array you are trying to add is null

1 Like

If the item passed is null, Will it be the issue? or the row item will be written empty

yes of course, it wont write as empty as it will require value while we pass as argument

Cheers @Sweety_Girl

1 Like

we can validate that with write line activity with that variable been mentioned
did we get any output value in the output panel for that variable for second transaction
Cheers @Sweety_Girl

1 Like

I haven’t tried this yet, but if you have any value as null in the array, try passing it as String.Empty. Don’t know whether it works or not.

@Sweety_Girl

1 Like

I have passed the transaction.specificcontent item data

If that is empty, we cant add it?

yes exactly
@Sweety_Girl

1 Like

but we can do one thing
we can validate such variables
like use a if condition like
String.IsNullOrEmpty(yourvariablename)
if this condition passes it will go to the THEN part
were leave it empty
and if the condition fails it will go to ELSE part where put the add data row activity so that only variable with values with get added

@Sweety_Girl @HareeshMR
CheerS

1 Like

It works @Palaniyappan? I’m not sure whether it works or not :slight_smile:

2 Likes

Just now edited buddy
@HareeshMR @Sweety_Girl

[quote=“Palaniyappan, post:10, topic:138560”]
but we can do one thing
we can validate such variables
like use a if condition like
String.IsNullOrEmpty(yourvariablename)
if this condition passes it will go to the THEN part
were leave it empty
and if the condition fails it will go to ELSE part where put the add data row activity so that only variable with values with get added

/quote]

2 Likes

I am adding 7-8 values in the add data row…
Will I be able to check all with if?

1 Like

Using or condition , you can do for all the values :slight_smile:, but it will be bit complex, use different If conditions for all the variables @Sweety_Girl

1 Like

yes of course
thats possible using condition like this
String.IsNullOrEmpty(yourvariablename1) or String.IsNullOrEmpty(yourvariablename2) or String.IsNullOrEmpty(yourvariablename3) or String.IsNullOrEmpty(yourvariablename4) or…

Cheers @Sweety_Girl

1 Like

but in this approach, we cannot find which variable is having the null value @Palaniyappan :slight_smile:

1 Like

rather to find which one is not having value
i hope we need to avoid if any one has no value before adding to datarow
kindly correct me if i m wrong
cheers @HareeshMR @Sweety_Girl

2 Likes

Thank you for the help @Palaniyappan and @HareeshMR

1 Like

No worries
Cheers @Sweety_Girl

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