Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Mark record in gallery as submitted

(0) ShareShare
ReportReport
Posted on by 395

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:
  • WarrenBelz Profile Picture
    WarrenBelz 145,580 on at
    Re: Mark record in gallery as submitted

    @Matt383 ,

    You can accept the subsequent solutions to the different issues as well if you wish.

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

    Thanks Warren,

     

    I created another uniqueIdentifier (Onvisible) UpdateContext({uniqueIDuser1: Text(Round((Rand() *1000) ,0),"[$-en-US]000#")}) Everything now deleting as it should. Thanks

  • WarrenBelz Profile Picture
    WarrenBelz 145,580 on at
    Re: Mark record in gallery as submitted

    @Matt383 ,

    Then you probably cannot delete a specific record unless you want to get rid of the confirmation.

    Remove(
     KBLCollection,
     ThisItem
    ) 

     

    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
    Matt383 395 on at
    Re: Mark record in gallery as submitted

    Sorry originally had a Unique Identifier in the app for sharepoint list but no longer have it. 

  • WarrenBelz Profile Picture
    WarrenBelz 145,580 on at
    Re: Mark record in gallery as submitted

    @Matt383 ,

    It should delete the entry (or entries) where the UserID is the one selected in the gallery. As I asked before, is UserID a unique identifier?

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

    Hi Warren, no errors, however when i delete an entry, it deletes all entries except one

  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 145,580 on at
    Re: Mark record in gallery as submitted

    Hi @Matt383 ,

    I suggest this approach. On the OnSelect of the Trash icon

    UpdateContext(
     {
     DeleteConfirm:true,
     DelID:ThisItem.UserID
     }
    )

     On the Confirm button

    RemoveIf(
     KBLCollection,
     UserID=DelID
    )

    I am assuming here that UserID is a unique identifier.

     

    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
    Matt383 395 on at
    Re: Mark record in gallery as submitted

    The last issue im hoping you can help me with is the delete confirm function i have. It has worked fine in other apps but for some reason not in this one. When you select the trash icon to delete an entry in the gallery and select confirm, it deletes the entry below it, sometimes above it. If i select the first entry it deletes the correct one.

    I have a screen (ED_Collection) with a gallery (KBLCollection)
    the Onvisible of ED_Collection is UpdateContext({DeleteConfirm:false}). I have a confirm and cancel button grouped with a label and some shape icons (see in image below) with visible properties set to DeleteConfirm. The onselect of the cancel button is UpdateContext({DeleteConfirm:false}) and the onselect of the confirm button is Remove(KBLCollection,LookUp(KBLCollection,UserID=CollectGallery.Selected.UserID));
    SaveData(KBLCollection,"KBLCollectKeep");
    UpdateContext({DeleteConfirm: false})
    The onselect of the trash can icon in the gallery is set to UpdateContext({DeleteConfirm:true})

    Matt383_1-1616375822060.png

     

     

  • Verified answer
    Matt383 Profile Picture
    Matt383 395 on at
    Re: Mark record in gallery as submitted

    Thanks Warren, that's the one, 🙂 

  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 145,580 on at
    Re: Mark record in gallery as submitted

    OK @Matt383 ,

    Try this

    Filter(
     KBXCollection,
     StartsWith(
     Title,
     Srchbox.Text
     ) && 
     (
     Dropdown1.Selected.Value = "all" || 
     If( 
     Dropdown1.Selected.Value="true",
     Submitted,
     !Submitted
     )
     )
    )

     

    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.

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,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard