Hi,
I have an app where an employee can click a button and a popup appears confirming if they want to submit. When they click on the confirmation, it creates an item in my sharepoint list. Now I want to give the user a warning popup or message if they press the button again to tell them that an entry exists already for today and if they would like to create another one.
Employees are allowed to sunbmit more than 1 entry a day but I want to warn them that an entry already exists for today. So basically I want to check all entrys of today and see if the current user has an entry, depending on that then i want to display a message.
Thaks in advance.
Solved! Go to Solution.
I would combine a LookUp to find a record that matches and combine that with the IsEmpty function. So warn user If(!IsEmpty(Lookup(DataSource, Match Criteria, AColumn) ), true, false). Probably not perfect but that is where I would start from.
I would combine a LookUp to find a record that matches and combine that with the IsEmpty function. So warn user If(!IsEmpty(Lookup(DataSource, Match Criteria, AColumn) ), true, false). Probably not perfect but that is where I would start from.
So I tried it but it only executes the true statement regardless of whether the database entry exists or not.
This is how my statement looks: If(!IsEmpty(LookUp('Database', DateCreated = Today() && PersonEmail = User().Email, PersonEmail) ), UpdateContext({showPopup:true}), UpdateContext({showPopup3:true}))
I am not sure whether it matters what column I return(in this instance it is personEmail)? I tested the lookup alone on a label and it returns the email if an entry exists otherwise blank. So the isEmpty should work right?
It should be able to show 1 of 2 popups depending on the condition.
So I changed the isEmpty to isBlank just to see and it worked!
Thanks!
Glad you got it and shame on me for getting the two functions mixed up. Boo!
The IsEmpty function makes more sense since it checks to see if an entry exists where as the IsBlank checks for NULL values so I would also think that the IsEmpty would work better. Anyway thanks again fot the help!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
196 | |
67 | |
46 | |
41 | |
28 |
User | Count |
---|---|
255 | |
119 | |
84 | |
81 | |
80 |