cancel
Showing results for 
Search instead for 
Did you mean: 

Extract values from Collection Field

AndreKöpplin
Level 5

Dear Community

I want to extract below information from a Collection field, which I got via APIRest Call. This information is incl. in a HTML code, because this is a Message, which incl. Pictures and hyperlinks.

Requestor (line manager):
Requestor (line manager) ID:
Impacted employee:
Impacted employee ID:
Required action: 
Document type:
Reason of issue: At request of customer
Letter language: German

Examle (shorted):

"fdgargtasdgwergtre4tgdgrgergdfgdfgdfgfgdfgdfgdfgfgdfgfgf<br />Requestor (line manager): Name Surname<br />Requestor (line manager) ID: 12345678<br />Impacted employee: Name Surname<br />Impacted employee ID: 132346697<br />Required action: Reference must be prepared<br />Document type: DocumentTitle<br />Reason of issue: At request of employee<br />Letter language: German<br />fdgargtasdgwergtre4tgdgrgergdfgdfgdfgfgdfgdfgdfgfgdfgfgf<br /><br /><br />"

I tried to use the VBO Utility - Regrex, but everything, which I tried and found in the Internet failed.

Thanks for help.

Andre

Blue Prsim Version: 6.10



------------------------------
Andre Köpplin
RPA Project Manager
Europe/Wroclaw
------------------------------
5 REPLIES 5

Mukeshh_k
MVP

Hi Andre Köpplin, Please refer below steps to solve your query -

  1. Use Utility String - Retrieve Regex Match : "Requestor \(line manager\):\s*([A-Za-z]+\s[A-Za-z]+)\s*(?:<br\s*\/?>\s*|,)\s*Requestor \(line manager\) ID:\s*(\d+)\s*(?:<br\s*\/?>\s*|,)\s*Impacted employee:\s*([A-Za-z]+\s[A-Za-z]+)\s*(?:<br\s*\/?>\s*|,)\s*Impacted employee ID:\s*(\d+)\s*(?:<br\s*\/?>\s*|,)\s*Required action:\s*(.*?)\s*(?:<br\s*\/?>\s*|,)\s*Document type:\s*([A-Za-z]+)\s*(?:<br\s*\/?>\s*|,)\s*Reason of issue:\s*At request of employee\s*(?:<br\s*\/?>\s*|,)\s*Letter language:\s*([A-Za-z]+)"   29510.png
  2. Replace Breaks with Comma to make it CSV like Structure29511.png
  3. Call Action Get CSV as Collection and Set Output Collection:29512.png
  4. Output :29513.png29514.png

Let me know if you find any difficulties implementing this - You can play around with output collection to set data as per your choice in any defined collection.



------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.

Regards,

Mukesh Kumar - Senior Automation Developer

NHS England, United Kingdom, GB
------------------------------

Regards,

Mukesh Kumar

Thanks a lot Mukesh

I am wondering, I can't find the Action "Retrieve Regex Match" in my VBO Utility Strings . Do you have any download link from Blue Prism DX Community?



------------------------------
Andre Köpplin
RPA Project Manager
Europe/Wroclaw
------------------------------

LakshmiNarayan3
Level 6

Hi @AndreKöpplin 

Other option as to do as well with Utility - Strings ( Extract Regex Values) 

[\<br\s\/>]+[Requestor\(line manager\)\s]+:(?<RequestorName>[\w\s]+)[\<br\s\/>]+Requestor \(line manager\)\sID:(?<RequestorID>.*)\<br \/>Impacted employee:(?<ImpactedEmployee>.*)\<br \/>Impacted employee ID:(?<ImpactedEmployeeID>.*)\<br \/>Required action:(?<RequiredAction>.*)\<br \/>Document type:(?<DocumentType>.*)\<br \/>Reason of issue:(?<ReasonofIssue>.*)\<br \/>Letter language:(?<Letterlanguage>[\w\s]+)\<br \/>

Build one collection with the group names as below

29523.png

Output will as this

29524.png

29525.png

Note - Group names should not contain spaces

Hope this will help

Regards



------------------------------
Lakshmi Narayana
------------------------------

for latest VBO you can find in DX portal Blue Prism Digital Exchange

Regards



------------------------------
Lakshmi Narayana
------------------------------

Hello Lakshmi 

Thanks a lot, with your help, I found my issues in the Regex Patern and I got my data from the HTML Text.

Thanks a lot also to Mukesh, I see, I have to update our Utilities.



------------------------------
Andre Köpplin
RPA Project Manager
Europe/Wroclaw
------------------------------