Hi,
How can i check if an item is already exist in sharepoint list using powerapps.i,e user should not be able to register to the same event again.
(Note : it is not a SharePoint list form.)
Event EmpEmail
SharepointSaturday Maruthi@gmail.com
Azure boot camp Maruthi@gmail.com
Appreciate your help.
I have two list :
1: Registration list : where i create items on click of submit button in powerapps
2: Events list : is the source list ,where lookup Events column in powerapps.
Attached is the screenshot for reference.
Solved! Go to Solution.
Hi @MaruthiKiran_jk ,
Have you solved your problem?
Based on the needs that you mentioned, I think the LookUp function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:
Set the OnSelect property of the "Click here to Register" button to following:
If(
!IsBlank(LookUp('Registration list', Event = EventDropdown.Selected.Value && EmpEmail = EmpEmailTextBox.Text)),
Notify("The user " & EmpEmailTextBox.Text & " has submitted same event for " & EventDropdown.Selected.Value & " already. Do not submit repeatly!", NotificationType.Error),
SubmitForm(EditForm1);ResetForm(EditForm1)
)
Please consider take a try with above solution, check if the issue is solved. If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.
Best regards,
You can use code like this in the OnSelect property of your Submit button to pre-check if the email already exists for a given event.
If(
IsBlank(LookUp(your_registration_list, Event = your_event_name And EmpEmail = User().Email)),
SubmitForm(your_form_name)
)
Note: you must input references to your own datasources/controls in this forumla
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi @mdevaney i have tried as you said, but it is not working as expected, form is not being submitted to the list.
Following is the formula i have used:
On Select : If(IsBlank(LookUp(Registration7,Event = "Agile ways of working" And EmpEmail=varUserEmail)),SubmitForm(Form1);NewForm(Form1))
Appreciate your help.
This is the section of code you should focus on. Your form is submitting because the combination of Event name and User Email do not already exist.
Event = "Agile ways of working" And EmpEmail = varUserEmail
Can you try typing in a combination of event and email you know are already in the list as a test and submit the form?
Event = "Agile ways of working" And EmpEmail = jsmith@xyzcompany.com"
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi @eka24 ,
i have used the formula as you said. But it is not working as expected. it is showing me that item "exist" in list even though it is not there.Following is the formula :
If(CountRows(Filter(Registration7,Event="Agile ways of working"))>0,"Exist","Does Not Exist")
Appreciate your help.
@mdevaney , Thanks a lot ,form is being submitted now. Following is the formula i have used.
If(IsBlank(LookUp(Registration7,Event = Dropdown1.Selected.Event And EmpEmail= "muk@novozymes.com")),SubmitForm(Form1);NewForm(Form1))
yes 🙂
Then you should "Accept the Solution" that led to the answer. This will help others find the answer more quickly when they review this thread.
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 |
---|---|
258 | |
122 | |
85 | |
75 | |
72 |