cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vffdd
Responsive Resident
Responsive Resident

UpdateContext if this or this..

I know this is a simple one and one of you is going to just look at it and know immediately ! I just can't get the right syntax LOL

If(ThisItem.QueryStatus="New" , UpdateContext({InProgress:true}),UpdateContext({InProgress:false})

I want to say If Query Status is New or Newly Assigned !!

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @vffdd ,

The long version

If(
   ThisItem.QueryStatus="New" ||ThisItem.QueryStatus="Newly Assigned",
   UpdateContext({InProgress:true}),
   UpdateContext({InProgress:false}
)

but this would also work

UpdateContext(
   {
      InProgress:
      ThisItem.QueryStatus="New" || ThisItem.QueryStatus="Newly Assigned"
   }
)

 

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.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User III
Super User III

Hi @vffdd ,

The long version

If(
   ThisItem.QueryStatus="New" ||ThisItem.QueryStatus="Newly Assigned",
   UpdateContext({InProgress:true}),
   UpdateContext({InProgress:false}
)

but this would also work

UpdateContext(
   {
      InProgress:
      ThisItem.QueryStatus="New" || ThisItem.QueryStatus="Newly Assigned"
   }
)

 

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.

View solution in original post

vffdd
Responsive Resident
Responsive Resident

brilliant the 2nd one worked perfectly.  I was going to try the || but I always thought they meant  And not OR !! 🙂

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (44,767)