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
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.

Highlighted
jernejp
Level: Powered On

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

Ah, gotcha, makes sense! Thanks!

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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