cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vikna
Helper III
Helper III

Unable to minus form Gallery

Hi Team,

Would like your advise on below app.

If the selected Location card is "PLAZA SHELL" and Model = "HP Elitebook 830 (G5,G6,G7) then I need to patch the gallery to minus 1(-1)from the Sharepoint "CAR" column for that specific model and location.

 

I tried the below code, but it is not detecting {'CAR' : CAR-1}.

Please advise.

 

 

Coding Error.JPGApplication.JPGSharePoint.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
vikna
Helper III
Helper III

Weirdly after a restart if the computer, the original code works fine....I don't know what happened.

Thanks for trying  @WarrenBelz 

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @vikna ,'

Assuming you are selecting that record from the gallery below and CAR is a numeric column

If(
   DataCardValue44.Text = "PLAZA SHELL" && 
   DataCardValue28.Selected.Result = "HP Elitebook SHELL" && 
   PRODUCT="HP Elitebook 830 (G5, G6, G7)"
   ),
   With(
      {wCAR:GalleryName.Selected.CAR},
      Patch(
         YourListName,
         {ID:GalleryName.Selected.ID},
         {’CAR’: wCAR -1}
      )
   )
)

 

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.

vikna
Helper III
Helper III

Weirdly after a restart if the computer, the original code works fine....I don't know what happened.

Thanks for trying  @WarrenBelz 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,726)