I have form that requires a visitor to put in the name of the person they are visiting. as per the image below, if the person to visit is chosen, an email will be sent to them through Flow.
My issue is, if the datacard is not filled, the form does not submit but instead navigate to the 1st page and an error msg pops out. Being a noob in Powerapps, I need help to refine the script.
My current script on the button is :
I want it to not navigate but stay on the same screen if the Datacard (Person to Visit) is not filled in and let them know they need to fill up the Person to Visit field.
I tried this script:
but it doesn't work
Any help will be appreciated.
Move the call Navigate to the form's OnSuccess. That way you will only change screen only if the save operation is successful. If you keep it as it is, you will always go to Screen1.
You might also want to move the emailing part to the OnSuccess. That way you will only be sending the mail when you know the form is properly filled out.
One last note, why not use the Office 365 Outlook connector and send the mail right from within your app? You can read more about the connector here: https://powerapps.microsoft.com/en-us/tutorials/connection-office365-outlook/
Sorry I haven't moved on to this project of mine but would love to finish it. I haven't tried the Outlook connector, I'll look more into it. What is the advantage of having the outlook connector rather than using Flow to send emails? I'm a total noob btw, I am amazed on how far I got with doing this log in app for a company with issues.
I'll give your advise a try on the OnSuccess and let you know of the progress.
Thanks so much!
I have no hard facts about the use of Flow vs the Outlook connector, but for me I feel it adds unnecessary complexity to leave PA and call another service to get things going. Sure, if you have complex things to do Flow is probably very good to use, but for just sending an email, not so sure. Maybe someone more experienced can shed some lights on this.
Also, I think you have a limited amount of runs in Flow, so using those for a simple thing like sending an email maybe isn't the best.
If you stay within the confines of PowerApps I feel I have better control of things (albeit, probably imaginary! :p)
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand