RPA Acadamy Calculate Client Security Hash Extract Value with data manipulation

Hello, I am working on the assignment for Calculate Client Security Hash and I am stuck at the step where I need to use to extract the client information.
I used get tekst to get the client information and store it in one output variable: Client Information
Then I use Split String to get the values for Client_Id, Client_Name and Client_Country
So far so good.
But when I assign these values to a new string as input for the Hashformula it seems to contains enters.
I do not know how to remove these.
The expression I use for the split string is:
Client_information.Split({"Client ID: ", “Client Name”}, StringSplitOptions.None)(1)
Client_information.Split({"Client Name: ", “Client Country”}, StringSplitOptions.None)(1)
Client_information.Split({"Client Country: ", “”}, StringSplitOptions.None)(1)

When I use Write Line out_Client_ID+out_Client_Name+out_Client_Country the output shows

image

So there seem to be enters in the variables.
I hope someone can help me with removing the enters or using different option to get the values from Client_information.

Regards,
Petra

1 Like

Hi @Petra,

Please add “Trim” method along with ‘split’ to removes all leading and trailing white-space characters.

Client_information.Split({"Client ID: ", “Client Name”}, StringSplitOptions.None)(1).Trim
Client_information.Split({"Client Name: ", “Client Country”}, StringSplitOptions.None)(1).Trim
Client_information.Split({"Client Country: ", “”}, StringSplitOptions.None)(1).Trim

In the assignment, you have to enter the details to create hash code like this.

In your workflow, please use hash input as out_Client_ID+ "-"+out_Client_Name+ "-"+out_Client_Country .

Warm regards,
Nimin

3 Likes

Hi @Petra

I’m attaching a workflow file which I created when I was working on the same assignment some weeks back…

Check out the assign activities after Get Full Text activity I have there…

Those assign activities are used to handle the same problem you mentioned here, and also to split the values and get only the required data :slight_smile:

System1_ExtractClientInformation.xaml (16.0 KB)

Hope it helps!!

1 Like

Hi Nimin,

Adding the Trim method solved the issue.

Thanks,
Petra

1 Like

HI Lahiru,
Thanks for the quick reply. In this case adding the Trim was the solution.
Regards,
Petra

1 Like

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