
How does one set fields to be a "required" field when a user is filling out a PowerApp (or form)? I have searched and searched and nothing is jumping out at me. I realize that typically this would be handled if a PowerApp was connected to a data source such as a SharePoint list... but I am developing free-standing PowerApps to be completed and submitted via Microsoft Flows to designated email addresses. So in this case, how does one set fields to be "required" to be completed?
Appreciate the help... tga
You can check for the existence of data or specific values with formulas in a label and then allow the user to move forward. But you will need to use the "Set" function which creates a global variable. This allows you to set the value of a label from within the If statement. In the example below I use the set statement to create a variable called "testStringRequiredState". And, I set it to be "whoa this thing is empty" if a field I want to have a value in it is empty. If it has a value I set it to be "" and then - in the same part of the formula also execute the "SubmitForm" command (note it's separated by the semicolon.) Submit form only executes if you get to the that part of the If statement.
If(
DataCardValue11.Text = "", Set( testStringRequiredState, "whoa, this thing is empty" ),
Set( testStringRequiredState, "" ); SubmitForm(EditForm1) )