cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

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

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

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,325)