String Error : Index was outside the bounds of the array

Hello,
it is a little bit wired for this error because when i try to debug the execution it works but when i run it directly i have this error i am really confused and i can move on.

i am using this workflow :
image

assign VenderInformation :
System.Text.RegularExpressions.Regex.Split(VenderInformation,"\s?(?:\s?[a-zA-Z]*:\s)",System.Text.RegularExpressions.RegexOptions.IgnoreCase)

and second assign for the out_taxID where i get the error
venderinformation_arraystring(1)

Any help please

thank you

Hi @Talelovesky,

Try with below

Out_TaxID = VendorInformation.Split(VbNewLine.ToCharArray)(0).Split(":".ToCharArray)(1)

Thanks.!
Ramprasad

thank you i will try it :wink: :wink:

It is the same error when i run it drictly :wink: any help

Place this assign activity after get text Activity
Out_TaxID = VendorInformation.Split(VbNewLine.ToCharArray)(0).Split(":".ToCharArray)(1)

it is the same error :
image

check your get transaction data did u set transactionitem = transaction number - 1

Hi @Talovesky,

Please find the below Solution

TaxID = VendorInformation.Split(VbNewLine.ToCharArray)(0).Split(":".ToCharArray)(1)

UiPathForum_157109_TaxID.xaml (5.0 KB)

Thanks.!

thank you for your help it was so valuable

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