Level 3 assignment 1 extracting client information

I used OCR to do the workflow but its always telling me the workflow is faulted and stops, do i have to use another method and if so which one?

Hi @John_Dara,

Are you trying to extract client information from this block? Screenshot_71

yes i am

This is what i keep getting

Hi @John_Dara,

First use a “Get Text” activity to capture the entire text as a block and then extract Client Name, Id and Country by using Split method.

Let “Client_Block” be the string holding the text value,
Assign a string variable, client_id = Client_Block.Split({"ID:","Client Name:"},StringSplitOptions.None)(1).Trim
Here, our delimiters are “ID:” &“Client Name:”. So the text block is divided into 3 parts. String before"ID:", String in between “ID:” & “Client Name:”, string after Client Name. That is {0,1,2}. We need the 1st string in the array, that’s why we specified as (1).

Likewise assign,

client_name=Client_Block.Split({"Name:","Client Country:"},StringSplitOptions.None)(1).Trim

For your reference, Please have a look at the workflow.Extract_Client_Info.xaml (7.6 KB)

For more details about split method, check this. https://docs.microsoft.com/en-us/dotnet/api/system.string.split?view=netframework-4.7.2

Warm Regards,
Nimin :grinning:


Thank you very much for this would get to work on it immediately::smiley:

1 Like

Hi @nimin its working but doesn’t execute for the next transaction do i need to change the selector?

Hi @John_Dara,

There is no need to use a dynamic selector to the “Get Text” activity. Could you please share the error that you are getting?



1 Like

Welcome back @nimin :slightly_smiling_face::slightly_smiling_face::slightly_smiling_face:
Nice to see your comments back here…


@Lahiru.Fernando Thanks bro… :grinning::grinning:

1 Like

It has actually worked i’ve fixed the fault thanks again

1 Like

Hi @nimin please my transactions are only processing 1,3,5,7,9,11,13 excluding the even numbers aoutput.json (910 Bytes) please help check the logs to see if you can spot an error

Hi @John_Dara ,

It seems like your TransactionNumber variable is incrementing more than once after completing each transactions. Please make sure that you are not using more than one assign activity to increment transaction number value. :slightly_smiling_face:


I have checked it and its just one assign activity

what i can suggest you to do after using write line if you cant find anything is to blind break search for the problem, set breakpoint in ur first activity for process transaction. there check the output window, if the transaction number or transaction item number = 1 or 2 (depends on where u put ur increment, then it should be something wrong in ur process transaction, if it is more than 2, then it is definitely something wrong in ur get transaction data part. if u cant identify the first time, then continue the workflow until it loops back to the breakpoint. here u can check if the number = 2 or 3, process transaction error, anything more then its ur get transaction data’s flaw.

edit: to add on: if ur first transaction is 1, then ur second one should be 2, if it show 3, then it is ur get transaction data error.

once u identify which part the error belongs to, repeat the middle point breakpoint method like the above by setting the breakpoint distinctively. it should work for u but tedious, and it is recommended that you use this method as a secondary plan in case write line doesnt tells u where.


Thanks i’ve been able to submit :smiley:

could you share where did the error occur here, if you managed to found out about it yourself, or with the help of others, if a particular comments is what helped you solve your problem, would you mind marking it as solution? such that others are able to pick up what can be probably helpful to them and close off the thread?


I didn’t edit anything before submitting although i didn’t get a 100%, but would definitely go back to check it out when i’m done wiith assignment 2.

1 Like

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