Hello,
I have a flow that will run when the character starts with 0.
Is there a way to add a condition that will count the number of characters?
Thus, the flow will run only if the character starts with 0 and count of character is 15 digits.
Thanks for anyone who can help.
@creativeopinion thank you very much for sharing your knowledge.A great help. my flow in now working.
@GPT2 When you enter a number into the condition value field—it's viewed as an integer. To convert it to a string you need to use an expression and the string() function. Enter the value into the string() function. In your case, it's a 0. This expression will convert the integer to a string.
To count the length of characters in your string of text (Compose action with telephone number) you need to use an expression and the length() function.
Click on the dynamic content and insert the output from the Compose action above.
Tip: You may want to add a Compose action above the Condition action instead to store the length(). Since the Condition action will not output the length anywhere for you to view. This can help with troubleshooting your flow as you can verify the output of the Compose action. I cover how to do this in the tutorial I linked previously.
@creativeopinion Here, I would like to send the email once it satisfy the condition (the tel number output start with 0 and the number length of character is 15 digits)
@GPT2 Could you share a screenshot of your full flow. It's hard to provide any recommendations when I've only seen a portion of the flow.
The length of a string of text can be used in a condition.
@creativeopinion ,can the length of the character be used as a condition?I would like to add it below.
Also when I try to run the flow below using the condition output starts with 0 I encounter an error
Do you have any suggestion in order to run the flow that when the string starts with 0 and it has 15 character it will proceed to the next step?
I am still exploring power automate and still many things to learn.
Help is highly appreciated.
@GPT2 If you are evaluating a string of text you can count the characters using an expression and the length() function.
length([insert string of text])
You might be interested in this YT Tutorial: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows
IN THIS VIDEO:
✅ How to troubleshoot a false Condition action result
✅ How to get dynamic content when it isn’t selectable from the list of dynamic content
✅ How to troubleshoot an Apply to Each action that isn’t looping through
✅ How to troubleshoot a skipped Apply to Each action
✅ How to troubleshoot a Filter Query
✅ How to use a SharePoint yes/no column in a Filter Query
✅ How to use Compose actions to troubleshoot a Power Automate flow
✅ How to troubleshoot multiple emails being sent
✅ How to troubleshoot multiple Teams messages being sent
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional