Examples of Control validations in PowerApps
Many times we have situations where we need to validate various controls on any form. Doing this on PowerApps forms is tricky (being a techie, your default psyche would be to write one line of code to achieve this -- however as you know, that is not the case with the PowerApps: courtesy its low code, no code philosophy 💔💔💔). To check if a control is empty: The following form contains an EmplId field, which is a mandatory field. We can add a label file like this: Go to the label file's Visible event: And write on the following formula: To check if an entered Email Id is correct: And then in the visible event of the label control, you write: As a result, when you run the form, as a preview: Giving something gibberish will give you an error like this. However, giving a proper email Id, this label disappears: Date control validations: Similarly, we can embed a datepicker control and ensure that the user doesn't select a future date, simply by writing: Conditional visibility of c...