Hate to revive an outdated thread, but I do not see a Required option anywhere on my Text Input boxes.
Nothing here:
Nothing here:
Have they removed this option? Or is it not available to me for some reason? Here is my tree view if that helps:
Thanks!
Solved! Go to Solution.
In all my years I've never seen a Required property on a TextInput control. I believe you might be confusing with the Required property that is found on a DataCard in a Form control. The required property on the DataCard plays into the logic for the Form Validation.
TextInput controls by themselves do not have a Validation capability. Making a TextInput control required is part of your OWN logic for validation.
Ex. Setting a "submit" button to disabled if the TextInput control is blank. Showing a "Required" label if not filled in, etc.
But these are all part of your own logic.
If you want a Required control, it would need to be in a Component capable of Validation. The only one that comes to mind is a Form Control.
I hope this is helpful for you.
(I moved this message to its own topic so your question is not buried at the bottom of a thread)
The Required property is available in the Form control. If you have a form, each data card will be required if the underlying data source has that field required. You can also force a data card to be required by setting its Required property to true and it will only be required in the given app.
The form control in Power Apps handles the requirements without any additional work on your part besides flipping the property true/false. An error will appear in the form automatically if the user attempts to SubmitForm without filling out the required field.
If you want to require a field outside of a form, you can create this experience by wrapping a condition around the action you want.
For instance, suppose you have a button that has an action OnSelect to patch some data. You can use a condition like this to require a value in the text box:
If(
!IsBlank(Trim(TextInput1.Text)),
Patch(...)
)
This means, "Trim the spaces in the text input box. If the result is not blank, then patch the data (or do whatever action you want)."
Let me know if this helps.
In all my years I've never seen a Required property on a TextInput control. I believe you might be confusing with the Required property that is found on a DataCard in a Form control. The required property on the DataCard plays into the logic for the Form Validation.
TextInput controls by themselves do not have a Validation capability. Making a TextInput control required is part of your OWN logic for validation.
Ex. Setting a "submit" button to disabled if the TextInput control is blank. Showing a "Required" label if not filled in, etc.
But these are all part of your own logic.
If you want a Required control, it would need to be in a Component capable of Validation. The only one that comes to mind is a Form Control.
I hope this is helpful for you.
@RandyHayes Thank you for the clarification. I did end up adding this to my submit button and works as I intended.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
181 | |
67 | |
36 | |
33 |
User | Count |
---|---|
342 | |
273 | |
113 | |
74 | |
58 |