Else Ifアクティビティの条件文の書き方

こんにちは
UiPath Studio 2022.4.3EnterPrise Editionユーザです。

FoeEachRowアクティビティの内部に配置したElse Ifアクティビティの条件文で

Rowに ","が10個連続 が含まれる場合、またはString.Emptyの場合にTrueになる条件文を書きたくて下記の構文を書きましたがTrueになりません。正しい書き方をご教示ください。


Row.ItemArray.Contains(",,,,,,,,,,") OrElse String.IsNullOrWhiteSpace(Row.ItemArray.ToString)

@gorby

When you say 10 consecutive , you mean 10 empty columns ?

When you say empty all columns are empty?

if so the condition above is wrong

you need to use String.Join(",",Row.ItemArray).Contains(",,,,,,,,,,") OrElse String.Join("",Row.ItemArray).Contains("")

cheers

No, Pls see below. This dt is made by one column.

String.Empty
consecutive 10"," in one column
String.Empty
String.Empty

@gorby

then also you need to join…if row

then String.Join("",row.itemArray).Contains(",,,,,,,,,,")

cheers

@gorby

can you please show a screenshot or an excel how it looks that would help

cheers

I cannot show you screenshot due to internal policy.
Is the next Syntax acceptable?
Row.Contains(“,”)

@gorby

okay then say this do you want to check if atleast one column in a row is empty or is havign 10 commas?

cheers

Correct!!!

@gorby

try this

Row.ItemArray.Select(function(x) x.Trim).Contains(",,,,,,,,,,") OrElse String.IsNullOrWhiteSpace(Row.ItemArray.ToString)

What you write looks correct may be it might have some extra characters

cheers