How to remove URL parameters.(Power Automate Desktop)
Here is how to remove the GET parameter from the URL.
This is the reverse of "How to leave only the GET parameter from the URL".
Overall view of Flow
Robin(for copy and paste)
It can be copied and pasted into Power Automate Desktop.
SET Url TO $'''https://www.samurai-emblem.com/?test=value'''
Text.ParseText.ParseForFirstOccurrence Text: Url TextToFind: $'''?''' StartingPosition: 0 IgnoreCase: False OccurrencePosition=> Position
IF Position >= 0 THEN
Text.GetSubtext.GetSubtextFromStartTo Text: Url NumberOfChars: Position Subtext=> Subtext
END
Steps
URL parameters begin with "? and therefore use that rule.
First, use the Parse text Action to locate the "? Find the location of the ?
Parameter | Value |
---|---|
Text to parse | URL to delete parameter. |
Text to find | ? |
Is regular expression | OFF |
Starting parsing as position | 0 |
First occurrence only | ON |
Next, place an If to control the URL parameter (?) to prevent errors if the URL parameter(?) is not present.
This is not necessary in cases where the URL parameter(?) is not necessary in cases where the URL parameter(?) is always present.
Parameter | Value |
---|---|
First operand | %Position% |
Operator | Greater than or equal to(>=) |
Second operand | 0 |
Place Get Subtext in If.
Parameter | Value |
---|---|
Original text | URL to delete parameter. |
Start index | Start of text |
Length | Number of chars |
Number of chars | %Position% |
When this flow is executed, the generated variable (%Subtext%) in the Get subtext Action parameter is set to the URL from which the parameter was removed.
For those who want to learn Power Automate Desktop effectively
The information on this site is now available in an easy-to-read e-book format.
Or Kindle Unlimited (unlimited reading).
You willl discover how to about basic operations.
By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.
Discussion
New Comments
No comments yet. Be the first one!