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

Formula to patch checked items in gallery to sharepoint

Hi,

I have  two date pickers one for start date and other for end date when I select start date and end date and click on add button range of particular dates will be displayed in gallery, in gallery I have check box only selected items in gallery (i.e if checkbox = true) then if I click on check icon it should get stored in to SharePoint.This is my app where default option for checkbox will be trueThis is my app where default option for checkbox will be true

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Hemasai1999 ,
Syntax structure below - you have only mentioned on field to add

ForAll(
   Filter(
      YourGalleryName.AllItems,
      YourCheckBoxName.Value
   ) As aPatch,
   Patch(
      YourSharePointList,
      Defaults(YourSharePointList),
      {YourSPDateField:aPatch.YourGalleryDateField}
   )
)

 

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

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @Hemasai1999 ,
Syntax structure below - you have only mentioned on field to add

ForAll(
   Filter(
      YourGalleryName.AllItems,
      YourCheckBoxName.Value
   ) As aPatch,
   Patch(
      YourSharePointList,
      Defaults(YourSharePointList),
      {YourSPDateField:aPatch.YourGalleryDateField}
   )
)

 

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.

Hemasai1999
Helper III
Helper III

Hi @WarrenBelz ,

This formula is working fine to patch all the checked items in gallery but when I want to patch start time and end time separately for each date then it is storing same start time and end time for all dates in SharePoint. In formula Label10_4 is my start time and Label 10_5 is my end time 

This is my galleryThis is my galleryThis is my sharepointThis is my sharepointThis is formula which I have used to store in sharepointThis is formula which I have used to store in sharepoint

Hi @Hemasai1999 ,

What is the name of the control that you have the date in, is the field name it refers to Title (this is Text, not a date) and what is the Items of your gallery?

Hi @WarrenBelz ,

Items for my gallery is DateRange which is collection that I have in my formula .

My issue is : I have start time and end time for each date when I edit start time and end time then it should store separately for separate dates. Instead If I edit for one date then It is updating same start time and end time for all dates

In my app I have one icon that is eye icon in that icon I have written formula as below picture , this formula is to basically select all dates from start date to end date and display in galleryIn my app I have one icon that is eye icon in that icon I have written formula as below picture , this formula is to basically select all dates from start date to end date and display in galleryThis is formulaThis is formula

@Hemasai1999 ,

It would have been good to post that piece of code at initially in your post. Can you please re-post in text and explain a bit exactly what you are trying to achieve with it.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,840)