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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,775)