Hello all!
So I have an application where a user inputs the phone number of a customer to save in the database, but having duplicate phone numbers is not allowed. I figured out how to warn the user that the phone number already exists using If function, but I would also like to show the user in a gallery all the information of the customer's typed phone number (Name, Notes, Email, Phone: All this information is present in a data source.) and this should be done only after clicking a button. This button is the same that warns the user about a duplicate find.
Going back to your previous post - one modification
UpdateContext(
{
varLead:
LookUp(
Leads,
LeadPhone=txtContactPhone.Text
)
}
);
If(
!IsBlank(varLead.LeadPhone),
Notify("Warning, phone number found. Submit again?",Information);
UpdateContext({varResubmit:true}),
Patch(
Leads,
Defaults(Leads),
{LeadPhone:txtContactPhone.Text}
);
UpdateContext({varResubmit:false})
)
All the details could then be shown on labels - varLead.Name, varLead.Notes, varLead.Email, varLead.LeadPhone
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473