cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jernejp
Level: Powered On

Getting item id in EditForm to create a delete button

Hi,

 

I have an EditForm that pulls information from my database.

Now I'm trying to create a delete button for the record within the form, but I'm stuck with trying to get the Item ID.

I've looked at this article: https://docs.microsoft.com/powerapps/maker/canvas-apps/controls/control-form-detail, which says that there's a Item parameter, that can be used. However, When I try to use EditForm.Item I get an error and it doesn't even show up in the autocomplete. 

 

What am I missing?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
jernejp
Level: Powered On

Re: Getting item id in EditForm to create a delete button

I found a workaround. I use a Gallery to list all items and then press on a button to take me to the editing form. So what I did was this:

RemoveIf('[dbo].[activity]'; id = Gallery2.Selected.id)

Which seems to work.

 

Thank you for your help!

View solution in original post

6 REPLIES 6
Highlighted
Gidrone_NS
Level: Powered On

Re: Getting item id in EditForm to create a delete button

@jernejp 

 

Just use Remove() function for delete selected Item.

 

Maybe problem is much more complicate. If os it, please provide more detalis.

 

 

jernejp
Level: Powered On

Re: Getting item id in EditForm to create a delete button

I found a workaround. I use a Gallery to list all items and then press on a button to take me to the editing form. So what I did was this:

RemoveIf('[dbo].[activity]'; id = Gallery2.Selected.id)

Which seems to work.

 

Thank you for your help!

View solution in original post

Gidrone_NS
Level: Powered On

Re: Getting item id in EditForm to create a delete button

@jernejp 

 

Try this:

 

Remove('[dbo].[activity]', Galelery2.selected)
jernejp
Level: Powered On

Re: Getting item id in EditForm to create a delete button

Is there a difference between the two?

Gidrone_NS
Level: Powered On

Re: Getting item id in EditForm to create a delete button

@jernejp 

 

No diference, it's same! But I prefered to use less condition when is possible.

jernejp
Level: Powered On

Re: Getting item id in EditForm to create a delete button

Ah, gotcha, makes sense! Thanks!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,980)