cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Franx
Frequent Visitor

Syntax help to evaluate records and trigger actions based on it

Hello All,

 

I need some help with two syntax I am utilizing, the purpose of the first syntax is to check if the current user has some progress on the app and if that is right, the app will keep the progress, otherwise it will reset the values of a slider and a couple of checkboxes in a gallery, I am currently checking two column values contained on a column in SharePoint, userEmail and FirstGrade.

 

 

If(LookUp(colNewHiresProgress, userEmail=varUserEmail, userEmail) And LookUp(colNewHiresProgress, FirstGrade="0", true), UpdateContext({sliderValue:0});UpdateContext({resetCheck:false}))

 

 

Also, I am having trouble activating the UpdateContext resetCheck, I think it is because the Default value of the checkbox that is present in the gallery has the following formula: 

 

 

If(ThisItem.IsDone="true",true,false)

 

 

Appreciate your help.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

Hi @Franx 

If(
    !IsBlank(
             LookUp(colNewHiresProgress, userEmail=varUserEmail
             ) 
    ) && 
     !IsBlank(
               LookUp(colNewHiresProgress, FirstGrade="0"
               ), UpdateContext(
                                {sliderValue:0}
                  ), UpdateContext(
                                   {resetCheck:false}
                    )
)

Checkboxes are either true or false, no If() is necessary.

ThisItem.IsDone.Value

evaluates to either true or false.

 

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

Hi @Franx 

If(
    !IsBlank(
             LookUp(colNewHiresProgress, userEmail=varUserEmail
             ) 
    ) && 
     !IsBlank(
               LookUp(colNewHiresProgress, FirstGrade="0"
               ), UpdateContext(
                                {sliderValue:0}
                  ), UpdateContext(
                                   {resetCheck:false}
                    )
)

Checkboxes are either true or false, no If() is necessary.

ThisItem.IsDone.Value

evaluates to either true or false.

 

Franx
Frequent Visitor

Thank you @Drrickryp

I added an extra parenthesis to the first formula and the second one didn't allow me to include the '.value', appreciate your help.

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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