cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jernejp
Helper IV
Helper IV

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

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
Anonymous
Not applicable

@jernejp 

 

Just use Remove() function for delete selected Item.

 

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

 

 

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!

Anonymous
Not applicable

@jernejp 

 

Try this:

 

Remove('[dbo].[activity]', Galelery2.selected)

Is there a difference between the two?

Anonymous
Not applicable

@jernejp 

 

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

Ah, gotcha, makes sense! Thanks!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (8,230)