Picking the correct value

hi i have a scenario … i will be getting input as number of ICD codes
example = “G56.0, M79.641,M79.642,M25.674,M23.56”
requirement 1: if we get a code like letter “Z”
so that code has to taken and that should be entered in first dailog box
and the reaming codes has to enter into the second box
requirement 2 : if we are not getting code with letter “z”
first code has to taken and enter into the first dailog box
and the reaminig codes has to enter into the second box

can u please provide the code or create some workflow
it will be great helpful to me

maybe your are looking for this:
grafik

Retrieval - Case No-Z
grafik

Case with Z
grafik

we can use above prototype code within assign Activities

UPD1- extension to the Set Splittings
grafik

Done within the immediate panel:
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

1 Like

can u send me a workflow please

check the updated post from above

i need variable types … for arrsplits

we can derive as it is mentioned:
grafik

String Array

Docu:

Hey @Nikhil_Katta

Use below mentioned LinQ in Assign Activity:

For First Dialog Box:

str_FirstBox = If(str_Input.Split(","c).Any(function(x) x.Trim.ToLower.StartsWith("z")),str_Input.Split(","c).Where(function(x) x.Trim.ToLower.StartsWith("z")).ToArray().First,str_Input.Split(","c).First)

For Second Dialog Box:

str_SecondBox = String.Join(",",str_Input.Split(","c).Except({str_FirstBox}).ToArray)

Output with Z:

Output without Z:

Workflow Screenshot for reference:

Variable Panel:

Attaching .xaml for reference:
PickingCorrectValuefromArray_Sequence.xaml (8.0 KB)

Regards,
Ajay Mishra