Hi, 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
@Matt383 ,
You can accept the subsequent solutions to the different issues as well if you wish.
Thanks Warren,
I created another uniqueIdentifier (Onvisible) UpdateContext({uniqueIDuser1: Text(Round((Rand() *1000) ,0),"[$-en-US]000#")}) Everything now deleting as it should. Thanks
@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.
Sorry originally had a Unique Identifier in the app for sharepoint list but no longer have it.
@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?
Hi Warren, no errors, however when i delete an entry, it deletes all entries except one
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.
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})
Thanks Warren, that's the one, 🙂
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.