How to remove URL parameters.(Power Automate Cloud flows)
The reverse of "How to use only URL parameters."
Steps
Since the URL parameter begins with "?" and therefore use that rule.
First, in a variable, prepare a URL to delete the parameter.
Next, retrieve the position of the "?" position.
Use the indexOf function.
indexOf(variables('url'),'?')
Next, prepare a variable to store the converted URL.
Then, initialize the URL for parameter deletion.
Next, "Condition" set up.
Parameter | Value |
---|---|
Left | Starting position of the URL parameter. |
Center | is greater than or equal to |
Right | 0 |
No parameter is set for "If no".
If there is no URL parameter, the start position is set to -1, and the "If no" case is entered.
Since nothing is done, the converted URL remains the same.
For "If yes" specify the following expression.
Use the substring function.
substring(variables('url'),0,variables('startPosition'))
The result is the URL with the parameter removed.
---
Discussion
New Comments
No comments yet. Be the first one!