Power Apps – Split text in two by separator
3 steps

Introduction:
Here we will learn how to separate text with a separator. In this example the separator is a dash (-)

Step 1:
Insert a text input named TextInput1. Change the following properties:
Default property
""

Step 2:
Insert a label named Label1. Change the following properties:
Text property
First(Split(TextInput1.Text,"-")).Value

Step 3:
Insert a label named Label2. Change the following properties:
Text property
If(IsBlank(Find("-",TextInput1.Text)),
"",
Last(Split(TextInput1.Text,"-")).Value
)

Conclusion:
To test, type two words into TextInput1 separated by a dash. You will notice that the first and second word will populate Label1 and Label2 respectively.
Did this article help? Let us know how we can improve. Send us a message by clicking the “Contact Us” button below.
Article last updated on Mar 19, 2024
Need expert guidance on Power Apps?