Hi!
I have a bot that is webscrapping ui data. In one of my variables got the extract of the url:
/opp/62cd8ec5da10324fb653b636727a66f0/view?keywords=&sort=-modifiedDate&index=opp&is_active=true&page=39&organization_id=300000251,300000409&naics=52,54
My next step with this variable: varOppLink
What I need to have happen the moment my bot is in the activity “Get Row for VarOppLink” is to remove the first few characters (/opp/) and the excess characters (/view?keywords=&sort=-modifiedDate&index=opp&is_active=true&page=39&organization_id=300000251,300000409&naics=52,54)
So that I am left with a unique Id of the numbers of the url only (62cd8ec5da10324fb653b636727a66f0)
I appreciate the help fam!
RobertD
(Docan Robert)
July 15, 2020, 1:52pm
2
You could use the following regex if the string you’re looking for is always between /opp/ and /view
(?<=\/opp\/).*(?=\/)
2 Likes
Hi @Maria_Cabrera
You can use string manipulation for the same as below
url.Split("/"c)(2).ToString
Hope this helps you
Mark as solution and like it
Happy Automation
Best Regards
Er Pratik Wavhal
1 Like
Its giving me an error. Can this not be done in the “get row” activity?
Hi @Maria_Cabrera
You are trying to apply this in Get Row Item Activity ??
Happy Automation
Best Regards
Er Pratik Wavhal
@Pratik_Wavhal
I am, granted, I’m a new RPA developer so I’m not sure if thats the best way.
The URL is being extracted through webscrapping and then i’m taking that information and have an output an excel sheet.
Hi @Maria_Cabrera
Can you show the SS for the Excel Data.
And you take that URL as in input as string and then apply the string manipulation on that.
It will definetly work without error.
Happy Automation
Best Regards
Er Pratik Wavhal
What does SS mean?
Webscrapping.xaml (51.9 KB)
This is my webscrapping process and I tried adding the .Split("/"c)(2).ToString to the output of the get row activity and it gives me an error.
Hi @Maria_Cabrera
SS means Screenshot. Sorry i used the shortform for that.
I mean to say that can you provide the Screenshot for the Excel Data where you are storing the URL.
Happy Automation
Best Regards
Er Pratik Wavhal
Also, I attached in my previous message the process. Let me know if you can recommend a good way to remove that text somewhere in the process.
Thank you! I appreciate it!
Hi @Maria_Cabrera
I have prepared one dummy workflow for your understanding which can give you the idea
MainPratik.xaml (9.7 KB)
Forum _ Maria.xlsx (9.5 KB)
Workflow :-
Hope this helps you
Mark as solution and like it
Happy Automation
Best Regards
Er Pratik Wavhal
1 Like
@Maria_Cabrera I have updated your workflow by just adding an Assign Activity, and marked it with a Breakpoint so that you can Identify it easily. Check if it works. Also remove the breakpoint after identification.
Webscrapping.xaml (52.6 KB)
2 Likes
@Maria_Cabrera
That’s one way of doing it, and just in case because this is a 32 character GUID, you can use a regex as well.: - \b[\w-]{32}\b
I’m trying this now! Thank you for the update on the workflow! Running the bot right now!
2 Likes
Thank you all for your help!
system
(system)
Closed
July 18, 2020, 4:41pm
16
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.