How to Disable a Button Until a Text Box Has Text in Power Apps
A Send button shouldn't work while there's nothing to send. Set its DisplayMode to Disabled while the text box is empty, and while the save is running, so it can't be pressed twice.
Low-Code and No-Code Development Platforms
View All TagsA Send button shouldn't work while there's nothing to send. Set its DisplayMode to Disabled while the text box is empty, and while the save is running, so it can't be pressed twice.
Notify shows a banner across the top of the app. Use it to tell people their save worked, or why it didn't.
Now() returns the current date and time. Use it to record when something happened, such as when a response was sent; Today() gives the date alone.
To empty a column, patch Blank() into it. Microsoft's reference: Blank returns a blank value, "use this to store a NULL value in a data source that supports these values, effectively removing any value from the field" (Blank function).
A SharePoint Choice column arrives in Power Apps as a record, not as text. To write to it with Patch, send a record too: {Value: "Pending"}.
Defaults gives you a data source's default values as a record. Its main job is to tell Patch "create a new item" rather than "update this one".
Patch saves to a data source without a form. Give it a new record from Defaults and it creates an item; give it a record loaded from the list and it updates that item. One formula can do both, so the same button handles the first save and every one after.
Long text needs a limit, and people need to see how close they are to it. Set the text input's MaxLength, and add a label that counts what's typed: 247 of 4,000 characters.
For more than a line of text, such as a comment or a description, use the modern Text input control with Type set to Multiline. Give it room, a placeholder and an accessible label, and read what's typed from its Text.
A date from a data source isn't ready to read. Text turns it into words, either with a ready-made format that follows each person's language, or with your own pattern.