Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Mark entry in gallery as submitted

(0) ShareShare
ReportReport
Posted on by 395

Hi, I have a jobcard app. When the user fills out the fields and selects the 'add record' button, it saves to a collection (see in step 1). This collection is linked to a gallery, within the gallery, i have a submit button which patches the data to a sharepoint list (see in step 2). I need to be able to mark the entry in the gallery as submitted, once the user has submitted the entry. Is there an automated way i can do this?, it has to be in the app, not the sharepoint list. Any assistance would be much appreciated.

 

Step 1:
Collect(KBLCollection,{Title:Employee_ED.Selected.Value,PO:PO_ED.Text});
SaveData(KBLCollection, "KBLCollectKeep")

 

Step 2:

Patch(KBL_App, Defaults(KBL_App, {Title: CollectGallery.Selected.Title,PO: CollectGallery.Selected.PO});
SaveData(KBLCollection, "KBLCollectKeep")

Categories:
  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Mark entry in gallery as submitted

    the Onselect of the Submit button is 
    Patch(KBL_App, Defaults(KBL_App),{Title: CollectGallery.Selected.Title,Date: CollectGallery.Selected.Date});
    SaveData(KBLCollection,"KBLCollectKeep")

     

    The Items property of the gallery is 

    KBLCollection

  • Cooper01 Profile Picture
    Cooper01 664 on at
    Re: Mark entry in gallery as submitted

    Are you able to provide the OnSelect of the Submit button as well as the Items property of your gallery?

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Mark entry in gallery as submitted

    Thanks Cooper01. I have a label within the gallery ThisItem.IsSubmitted=false
    and have this on the 'Submit button' ThisItem.IsSubmitted=true; If(ThisItem.IsSubmitted = true, Green,Red);

    When i add a record to the gallery, the label reads false, but when i click the submit button, there is no change, still false

  • Cooper01 Profile Picture
    Cooper01 664 on at
    Re: Mark entry in gallery as submitted

    Each item in your gallery would need the IsSubmitted column. Since you are showing items that are not submitted, it may make more sense to initialize the IsSubmitted to false. Then only when you perform your submit action, set IsSubmitted to true. Then in the gallery you should be able to conditionally style your button in ThisItem.IsSubmitted

  • Matt383 Profile Picture
    Matt383 395 on at
    Re: Mark entry in gallery as submitted

    Hi Cooper, thanks for getting back to me. Once i add it to the collection, it goes here to the gallery. I only want it to show as submitted, once they have Submitted the entry from the gallery. (example, if i submit test2, i need something in the gallery saying or showing submitted. I tried putting a variable on the button fill, but it changes all the buttons

    Matt383_0-1614814475807.png

     

  • Cooper01 Profile Picture
    Cooper01 664 on at
    Re: Mark entry in gallery as submitted

    You could add an additional column to your collection and then use that in the gallery

    Collect(KBLCollection,{Title:Employee_ED.Selected.Value,PO:PO_ED.Text,IsSubmitted:true});

    The new IsSubmitted column could be displayed in the gallery after the item is saved.

     

    Sounds like you may not need to store this value on the SharePoint list, but if you do you could add a new column

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard