Requirement: Split a Text input in Power apps using ForAll Function
App OnStart:
ForAll(
Split(
"This is for Demo",
" "
),
Collect(
colSplit,
Value
)
);
![](http://rishandigital.com/wp-content/uploads/2023/05/image-188.png)
Split the specified sentence with each and every space and then the Value will be stored in the PowerApps Collection named as colSplit.
Split the string by a space (” “), but also split by using delimiter like Comma (,), Semicolons (;) etc.
Add Labels,Textinput controls and Button,
where, Split the Text inputs of the name field and it will perform on the Power apps button input control(click on Split).
Button-
OnSelect Property:
ForAll(Split(textinput.Text,""),Collect(collectSplit,Value));
Where, TextinputName is textinput control name
colSplit is the Powerapps collection name where the Value will be stored.
![](http://rishandigital.com/wp-content/uploads/2023/05/Screenshot-2023-05-17-130717-1024x268.png)
Now Save and Preview the app.Enter some ID, Name by providing some spaces and click on the split button. Next go to the collection specified, view the table.
![](http://rishandigital.com/wp-content/uploads/2023/05/Screenshot-2023-05-17-130905.png)
![](http://rishandigital.com/wp-content/uploads/2023/05/Screenshot-2023-05-17-130942.png)