cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

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
Highlighted
Helper IV
Helper IV

Re: validate patch

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
Highlighted
Super User
Super User

Re: validate patch

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)
)

 

Highlighted
Helper IV
Helper IV

Re: validate patch

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.

Highlighted
Helper IV
Helper IV

Re: validate patch

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

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,776)