ForAll Split Function in Powerapps

Loading

Requirement: Split a Text input in Power apps using ForAll Function

App OnStart:

ForAll(
    Split(
        "This is for Demo",
        " "
    ),
    Collect(
        colSplit,
        Value
    )
);

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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *