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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (940)