Code to write to check if a value is contained

Hey Everyone

Looking for some advice on a robot I’m developing to log into my bank account and extract the transactions on my statements.

As part of the security for logging into my account there is a drop down menu to input the requested password character.

For example I have used the extract structured data activity to capture the value “character 3” , what expression could I write to pull out the character number which in this case is 3. Can I write something to pull out the index to get the value or should I use a contain statement to check if it contains a number 3 then the value would be *** based on my password. Any ideas or suggestions ?

Variable name is RequiredPasswordCharacter.

Hi @Alistair_Moffat,

Is the value retrieved from the extract structured data always in this format:

character <number>

You could try using an assign and to get the character number you may use the below:

RequiredPasswordCharacter = Split(value from extract structured data, " ")(1)

1 Like

Thanks @jcastro

Will give the above a try and see if its a success.


1 Like


This is probably a bit more clearer. So I have utilised the extract data activity to capture the value “Character 3”. I would like to pull out index 10, so in this case the value 3 would be the value for index 10. Any Ideas ? might seem a bit of a novice question but I’m very new to using UIPath.

Hello @Alistair_Moffat,

You can use the code I provided in an assign activity:

RequiredPasswordCharacter = Split(InputCharacterPasswordValue, " ")(1)

I’m not sure if the “:” is included in the value extracted. If it is, you can use the below code instead:

RequiredPasswordCharacter = Split(InputCharacterPasswordValue, " ")(1).ElementAt(0)

Hope this helps! :slight_smile:

1 Like

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