web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Mark record in gallery...
Power Apps
Answered

Mark record in gallery as submitted

(0) ShareShare
ReportReport
Posted on by 407

Picture1.pngHi, I have a jobcard app. When the user fills out the fields and selects the 'add record' button, it saves to a collection called KBLCollection. I then have a gallery called CollectGallery (The Items property of the gallery is KBLCollection), i have a submit button in the gallery (Submits to sharepoint list) with the onselect properties set to

Patch(KBL_App, Defaults(KBL_App),{Title: CollectGallery.Selected.Title,Date: CollectGallery.Selected.Date});
SaveData(KBLCollection,"KBLCollectKeep"), (The submit button is the black button in the gallery below)

When the user hits the submit button, I need something to show up saying that individual entry in the gallery has been submitted. Any assistance would be much appreciated

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    Hi @Matt383 ,

    You could do a Notify based on the Patch working

    Set(
     varPatch,
     Patch(
     KBL_App, 
     Defaults(KBL_App),
     {
     Title: CollectGallery.Selected.Title,
     Date: CollectGallery.Selected.Date
     }
     );
     If(
     !IsBlank(varPatch.Title),
     Notify("Your entry has been submitted", NotificationType.Success);
    	 Set(varPatch,Blank());
     SaveData(
     KBLCollection,
     "KBLCollectKeep"
     ),
     Notify("An Error has occurred", NotificationType.Error);
     )
    )

     

    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.

     

  • WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    Hi @Matt383 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • Matt383 Profile Picture
    407 on at

    Hi Warren,

     

    Thanks for getting back to me.

     

    I am getting an invalid argument on this section

    If(!IsBlank(varPatch.Title)

  • WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    Hi @Matt383 ,

    Bracket missing (free-typing without red lines to guide)

    Set(
     varPatch,
     Patch(
     KBL_App, 
     Defaults(KBL_App),
     {
     Title: CollectGallery.Selected.Title,
     Date: CollectGallery.Selected.Date
     }
     )
    );
    If(
     !IsBlank(varPatch.Title),
     Notify("Your entry has been submitted", NotificationType.Success);
     Set(varPatch,Blank());
     SaveData(
     KBLCollection,
     "KBLCollectKeep"
     ),
     Notify("An Error has occurred", NotificationType.Error);
    )

     

    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.

  • Matt383 Profile Picture
    407 on at

    Hi Warren,

     

    That works 😉 Now just need to show in the gallery which entries have been submitted. I added a label in the gallery with the text property set to varPatch.Title, but shows up blank.

    Sometimes the user will have 5 jobs in the gallery and may only submit 2. So need a way to show in the gallery, which ones have been submitted.

  • WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    Hi @Matt383 ,

    varPatch.Title will only show the last record submitted, so that will not work. You need a field in CollectGallery (call it Submitted) and Patch to that as well when you submit the record (use AddColumns and set it to false)

    Patch(
     CollectGallery,
     ThisItem,
     {Submitted:true}
    )

     

    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.

     

  • Matt383 Profile Picture
    407 on at

    I have added Submitted to the collection 
    e.g. Collect(KBLCollection,{Submitted: Label33.Text,Title:Employee_ED.Selected.Value})

    Then in the CollectGallery, on the onselect properties of the Submit button, i have 
    Patch(CollectGallery,ThisItem, {Submitted:true}) but is showing invalid argument.
    I also tried Patch(KBLCollection,CollectGallery,ThisItem,{Submitted:true}), still showing invalid arguments

    In regards to the (use AddColumns and set it to false), is that in the sharepoint list?. 

  • Verified answer
    WarrenBelz Profile Picture
    153,781 Most Valuable Professional on at

    Hi @Matt383 ,

    Submitted needs to be a Boolean (yes/no) and exist when the collection is first initiated. 

    Collect(
     KBLCollection,
     {
     Submitted: false,
     Title:Employee_ED.Selected.Value
     }
    )

    You can also use AddColumns on it (the Collection, not the list) to do it afterwards.

     

    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.

  • Matt383 Profile Picture
    407 on at

    Thanks Warren,

    Added to collection using, Collect(KBLCollection,{Submitted: false,Title:Employee_ED.Selected.Value})
    Then added label to gallery with text set to ThisItem.Submitted
    Then set the onselect of the submit button to Patch(KBLCollection,CollectGallery.Selected, {Submitted:true});

    Works great, thanks again

  • Matt383 Profile Picture
    407 on at

    Hi Warren, In regards to changing text or fill color. I would usually use something like
    If(ThisItem.Submitted.Value = "true",Green,Red) but getting invalid arguments. I assume i need to change the .Value to something else?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard