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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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