Assign Start Index ERROR

ClientInformation.Substring(Clientinformation.IndexOf("ClientID: ") +"ClientID: ".Length).Split(Environment.NewLine.ToCharArray)(0)

@Soudios

Before this Assign activity print ClientInformation value also and check whether it’s printing or not.

2 Likes

its printing anything

i fixed the problem by reparing but now i have a this problem :

Invoke System1_ExtractClientinformation workflow: startIndex cannot be larger than length of string.
Parameter name: startIndex

1 Like

@Soudios Are you able to get the ClientInformation Value in a Message Box?

yes

Issue is with your substring method, in substring method we have to pass two arguments (starting index, length of the string).

Here is issue is starting index is the more than the length of the variable which you are trying to get substring from.

1 Like

how can i do plz ?

Here the information i need :

@Soudios Actually this Statement worked for me :
ClientInformation.Substring(Clientinformation.IndexOf("ClientID: ") +"ClientID: ".Length).Split(Environment.NewLine.ToCharArray)(0)

Can you use ClientInformation.Trim and Check the Value

1 Like

You can directly use split string and iterate through the loop and remove the constants like ClientID: this will return just the values.

can you send me a picture plz ?

Kindly have a view on this thread

Cheers @Soudios

1 Like

can you send me a picture plzz ?

i just said the same way as above @Palaniyappan shared the link.

doesnt work for me


@Soudios I guess you need to use (2) at the end of the Statement

Can you explain me this part, i don’t really understand plz

Hello,

use below expression for get client id :

ClientInformation.Split({“:”,“Client”},StringSplitOptions.RemoveEmptyEntries)(1).Trim()

Thanks,

What is “TRIM” ?

Hello,

Trim() is used for remove extra space or blank new line.

Thanks.