Learn how to delete text from the left or right by specifying the number of characters.
Robin(for copy and paste)
It can be copied and pasted into Power Automate Desktop.
SET Text TO $'''abcde''' SET DeleteLength TO 2 IF DeleteLength < Text.Length THEN Text.GetSubtext.GetSubtextFrom Text: Text CharacterPosition: DeleteLength Subtext=> Subtext Text.GetSubtext.GetSubtextFromStartTo Text: Text NumberOfChars: Text.Length - DeleteLength Subtext=> Subtext2 END
First, prepare variables.
|Number of characters to delete.||%DeleteLength%|
Next, put in place an "If" to check for errors.
|Operator||Less than (<)|
To remove from the left, set the following.
|Start Index||Character position|
|Length||End of text|
To remove from the right, set the following.
|Start Index||Start of text|
|Length||Number of chars|
|Number of chars||%Text.Length - DeleteLength%|
When the subflow to run, the text of the deleted result is set to the variable produced in "Get Subtext".
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.