cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
King
Advocate III
Advocate III

validate patch

condition a patch

The idea is to let the patch be made if the status column of the registration list that I will update is = "Not registered" if this condition is not met, simply throw a:

 

Notify ("The employee has already registered", Warning)

The patch formula works well and is as follows:

Patch (employee, First (Filter (Employees, Code = brsScanner.Value)), {Status: "Registered"})


the above formula indicates which record to update when the content of a code I scan is equal to the content of a column in a list

How can I apply a formula that condition the status column in the record that I will update?

1 ACCEPTED SOLUTION

Accepted Solutions
King
Advocate III
Advocate III

I did it by bringing the status in a label

LookUp(Invitados, Code=brsScanner.Value,Correo)

 

If(Label1_2.Text="No Registered", Patch(Invitados, First (Filter (Invitados, Code = brsScanner.Value)), {Estado: "Registered"}), Notify("The Employee has already entered", Warning));

View solution in original post

3 REPLIES 3
timl
Super User
Super User

Hi @King 

One way to do this would be to lookup the status of your target record. You could then Patch the record, only if the Status is "Not registered".

If(IsBlank(Lookup(employee, Status="Not registered")),
  Patch (employee, First (Filter (Employees, Code = brsScanner.Value)), {Status: "Registered"}),
  Notify ("The employee has already registered", Warning)
)

 

King
Advocate III
Advocate III

Hi @timl  It has not worked for me, even if the employee has an "Unregistered" status, he always goes to the notification, and the patch always ignores it.

King
Advocate III
Advocate III

I did it by bringing the status in a label

LookUp(Invitados, Code=brsScanner.Value,Correo)

 

If(Label1_2.Text="No Registered", Patch(Invitados, First (Filter (Invitados, Code = brsScanner.Value)), {Estado: "Registered"}), Notify("The Employee has already entered", Warning));

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,957)