PowerApps delete SharePoint list item, related items, and confirmation

  Рет қаралды 74,055

Shane Young

Shane Young

Күн бұрын

This is another good one. 🐶 We add delete to an existing app with Remove. Then we delete child (related) records using RemoveIf. Oh and then we add a bonus Confirmation pop-up because that is awesome! I love this video.
Power Apps Consulting and training at www.PowerApps9...

Пікірлер: 109
@Kwakwaaa
@Kwakwaaa Жыл бұрын
I wouldn't recommend using RemoveIf function because it does not work if you have more than 3000 items on a SharePoint list. The function fetches first 3000 items and then remove from those fetched items. Let's say you have 4000 items on the list and you're trying to remove the 3005th item with RemoveIf, it will not work because that specific record was not fetched by RemoveIf. Instead, you should fetch with the Filter function, put that into a collection in PowerApp and use ForAll to remove. That way you can be sure that these items will be removed from the SharePoint list.
@ShanesCows
@ShanesCows Жыл бұрын
Yes, RemoveIf is not delegable
@DanielLopez-mb5es
@DanielLopez-mb5es Жыл бұрын
Love your help!!! I am trying to set a combo to Blank/Null when a certain value is selected in another combo. Can you please provide a clue on how to do this. Thanks
@ShanesCows
@ShanesCows Жыл бұрын
Set the DefaultSelectedItems for the ComboBox to a variable. On change of the other combo box set the variable to blank and reset t the first combo box. :)
@jaguscikm
@jaguscikm Жыл бұрын
Why rectangle for popup? Isnt better to use container? More control and better easier and quicker to arrange...
@ShanesCows
@ShanesCows Жыл бұрын
Yes. They weren’t really commonly used when I made this video. They are now.
@brittanyrosser2137
@brittanyrosser2137 2 жыл бұрын
When using the Remove(collection, thisitem) it removes random items from my gallery it isnt connecting to the correct line? Do you know why?
@ShanesCows
@ShanesCows 2 жыл бұрын
Your collection doesn't have a primary key so it gets confused and just removes whatever it wants. :( You need a field like row number so you can look up that record to delete. :(
@yousefqandah9708
@yousefqandah9708 Жыл бұрын
Hello, thanks for all these wonderful videos! does this work also if the data source is excel which is uploaded in Onedrive?
@ShanesCows
@ShanesCows Жыл бұрын
I would think so as long as you connect the dots.
@gbu03
@gbu03 Жыл бұрын
How do we do in dataverse table. How to set pop up for confirming deleting a row in dataverse table.
@ShanesCows
@ShanesCows Жыл бұрын
Everything would be the same as this video. Nothing here is tied to my datasource 😎
@benjamincpetersen
@benjamincpetersen 3 жыл бұрын
Thanks for another great video! One problem I have run into with the Remove function is that it is pretty much impossible to use it in a For All loop (boo!!! ☹) because it does not like "ThisRecord.". Not the end of the world, but it would be nice! Also, I usually make my popups by using a container. It's nice because then you can control the visibility just with the container and it works great as a parent. I have been container obsessed as soon as I saw them show up in the controls lol.
@ShanesCows
@ShanesCows 3 жыл бұрын
I like it. In a ForAll what I end up doing is using the primary key, like ID, to LookUp the record to Remove.
@pranaygubbawar3345
@pranaygubbawar3345 2 жыл бұрын
record is getting deleted from the database but not from ui any better suggestion for this
@ShanesCows
@ShanesCows 2 жыл бұрын
Y ou will need to use Refresh in this case. kzbin.info/www/bejne/nZ68nX1_n62GaK8
@MrEk5150
@MrEk5150 2 жыл бұрын
Each time I try to do something new (to me) I can always count on you to have tackled the problem already. Thank you Shane for sharing and for making me look like I know what I'm doing.
@ShanesCows
@ShanesCows 2 жыл бұрын
Happy to help. Have a great day. 🐶
@lhsdline
@lhsdline Жыл бұрын
Is there an alternative to delete/remove like a Deactivate?
@ShanesCows
@ShanesCows Жыл бұрын
There is not. You could create a column and make your own activate/deactivate functionality.
@zynabi740
@zynabi740 Жыл бұрын
Hi Shane, i was using Lookup within Remove function to remove child records, but its only removing first child record not all of it, i was wondering if i should use ForAll function as well, but how, if you can help. Thank you
@ShanesCows
@ShanesCows Жыл бұрын
Lookup only finds the first record that matches. RemoveIf would be another option for you. You will need somethign removes tables (multiple records).
@zynabi740
@zynabi740 Жыл бұрын
@@ShanesCows so initially i was using RemoveIf, it didnt work, then i used Lookup, and its only removing first record. is there a way to loop through my list and find all the records with matching id. and then remove. Thank you for the quick response.
@ShanesCows
@ShanesCows Жыл бұрын
@@zynabi740 Filter and ForAll is probably the best option. :)
@tricacole
@tricacole Жыл бұрын
Is posible to make download button?
@ShanesCows
@ShanesCows Жыл бұрын
There is a Download function but I have never had much luck with it. Maybe you will do better. learn.microsoft.com/en-us/power-platform/power-fx/reference/function-download
@abhijit6411
@abhijit6411 Жыл бұрын
Thank you very much for showing an awesome video for deletion in Canvas apps. I've a query. I've two lists in SharePoint. One holds current list and another is Archive list. When in my Canvas app, I clicked on my Archive button, it immediately transfer data from current list to archive list. I want to undo it. What is the way I can make an undo in canvas app or any other solution that will store a temporary archive list before moving to archive from current one but on click it will back again in the current list? Please let me know your suggestion.....
@jjayceeb
@jjayceeb 2 жыл бұрын
How can i remove if the item in gallery is equal to zero. My code is remove(product,if(prod-prod2=0,gallery.selected))... i need to patch update the new data in another sheet. And remove the item if it is equal to zero
@winnerbelieve6551
@winnerbelieve6551 Жыл бұрын
Have you tried with soft delete. It will leave a blank space in the gallery which is annoying.....Need some inputs from you Sir.
@jessefavela3694
@jessefavela3694 Жыл бұрын
I'm having trouble combining this with a text search function. I would like for users to be able to search a sharepoint list, and delete an item if they want.
@healthsys2551
@healthsys2551 2 жыл бұрын
Worked like a charm. Thanks!
@ShanesCows
@ShanesCows 2 жыл бұрын
You're welcome!
@itubeHirschberg
@itubeHirschberg 3 жыл бұрын
CDS or Datavers user interface? With Microsoft SQL Management Studio I can display data (I cannot change tables or data records) Are there any tools for creating tables, views, etc, ... and for manipulating data? Thank you
@ShanesCows
@ShanesCows 3 жыл бұрын
Not for working with the table but you can manipulate the data in a table with Excel. kzbin.info/www/bejne/mqe7mZ2nrNKaaas
@eileenmccarthy9965
@eileenmccarthy9965 3 жыл бұрын
great video! I'm having an issue with my trash can icon in a gallery. When I do "Remove(Collection, ThisItem)" it deletes the previous row??? What am I doing wrong?
@ShanesCows
@ShanesCows 3 жыл бұрын
I run into issues like this from time to time. In most cases I need to figure out a unique way to reference the row via lookup to solve it. 😔
@JenMayB
@JenMayB Жыл бұрын
Thank you Shane - this is awesome. I need to bring in a spo list based on lookup to ref ID of parent record, into a collection and then mess w that collection (edit, add, delete existing) and patch the collection back to the list to replace existing 😮. Based on this and other records I’m thinking of just having 2 separate galleries - update database and new items.
@ShanesCows
@ShanesCows Жыл бұрын
Keeping them separate can be quite helpful
@dquez9
@dquez9 2 жыл бұрын
Great video, although remove('listname') didn't work for me. had to use Remove('listname", Lookup('listname', title = "specific_item"). but all in all your video steered me in the right direction..it just took a little more. Good job as always Shane.
@ShanesCows
@ShanesCows 2 жыл бұрын
Glad it helped
@buffedbear8927
@buffedbear8927 3 жыл бұрын
Love your content. Im looking for the video where you build the child relation of this app. Is the video on your channel? Much love from germany!
@ShanesCows
@ShanesCows 3 жыл бұрын
I talk about relationships in this video kzbin.info/www/bejne/oJ7LaZibhrt0f8U which is about SQL but the process would be the same. Or you can watch this one where I do the same but for SHarePoint. kzbin.info/www/bejne/rpjdn55qjdGDedE
@HereticHulk
@HereticHulk 3 жыл бұрын
This is helpful for deleting from the gallery, but it doesn't like the code for removing a list item from my data source.
@ShanesCows
@ShanesCows 3 жыл бұрын
Remove(datasource, record) will delete from the data source. Make sure datasource is the actual datasource not a collection
@johnnystrong4735
@johnnystrong4735 2 жыл бұрын
Thanks for a great video. Definitely will subscribe. I've run into an odd issue with the Removeif command though. My delete button is simply supposed to remove items from my list that have a Date less than the Date I supply in a date picker. Works a charm unless there are more than 62 items that fit that criteria. If there are even 63 items that are within the date span, 62 will be deleted and 1 will be left. Any idea what could be causing that?
@ShanesCows
@ShanesCows 2 жыл бұрын
Odd. I have not seen that. What is your delegation limit set to? 62 maybe
@MrAbueslam
@MrAbueslam 2 жыл бұрын
I have learned a lot from your video, what a great ideas, very helpful. Thanks a lot.
@ShanesCows
@ShanesCows 2 жыл бұрын
Glad it was helpful!
@FCMarlaSinger
@FCMarlaSinger 3 жыл бұрын
Thanks Shane. Greetings from Brazil!
@ShanesCows
@ShanesCows 3 жыл бұрын
You are welcome 🙏
@altino91255268
@altino91255268 3 жыл бұрын
#Brasil
@teluguoffice5498
@teluguoffice5498 2 жыл бұрын
Hey Shane. Thanks for your video. I am trying to use same formula(Remove(My_Source_Data,Gallery2.Selected)) in PowerApps, but I am getting an error (Incompatible Type.The collection can't contain values of this type).
@ShanesCows
@ShanesCows 2 жыл бұрын
The items property of the Gallery needs to be the same as the table you are trying to remove from. That is my guess of your issue.
@PrithviChandrasekar
@PrithviChandrasekar Жыл бұрын
Hi Shane, Thanks for this video. I have a similar issue. The Items property of my gallery has a filter function for my search box. what could be done here? Filter(colRec_Input, SearchBox.Text in colname || SearchBox.Text in SP-colname.value || SearchBox.Text in SP-colname.Value )
@fabioalex9698
@fabioalex9698 3 жыл бұрын
Hi Shane, it was a brilliant power apps class, we are learnig a lot of things with your tips and apps, great job guy, congratulations and peace
@ShanesCows
@ShanesCows 3 жыл бұрын
Thanks 🙏
@franknielsen3219
@franknielsen3219 3 жыл бұрын
Nice video Shane. Hovever, when I delete child parent and child items, I always start with deleting the child items, and in the end the parent item. I have not experienced problems with this, but your idea with the confirmation box is awesome, so I think I am going to rebuild my delete function ;). Have a great day, and thx for the great tips
@ShanesCows
@ShanesCows 3 жыл бұрын
Awesome Frank. 🐶
@twolinesslotcars
@twolinesslotcars 3 жыл бұрын
Shane, Great channel! I am a new Sharepoint user, and have been tasked with creating a corporate intranet site. One of the requests is a Classified Ads type list. I am attempting to create a Power App, using a Sharepoint list. I was looking through all of your videos, but thought I would ask.. have you ever tackled anything like that in another video? Am I headed down the right path? Thanks in advance! - Marty
@ShanesCows
@ShanesCows 3 жыл бұрын
Hey Marty I think it is totally do able. I don't have a video on exactly that but maybe my shopping cart will inspire you? kzbin.info/www/bejne/kKXRZGyBqrSKZsk
@twolinesslotcars
@twolinesslotcars 3 жыл бұрын
@@ShanesCows thanks!
@ivanov6083
@ivanov6083 3 жыл бұрын
Heya! I was looking for this tip today!! Haha, tkx for share it!!
@ShanesCows
@ShanesCows 3 жыл бұрын
Awesome 😎
@leetyler3102
@leetyler3102 3 жыл бұрын
great stuff shane, have you played with the new IfError feature? would love to see a video on how to appropriately use that in the future!
@ShanesCows
@ShanesCows 3 жыл бұрын
It is on my list if it ever leaves preview.
@MrSmileyFella2
@MrSmileyFella2 3 жыл бұрын
The production quality of these videos are getting better and better haha
@ShanesCows
@ShanesCows 3 жыл бұрын
Thanks. I work on it a lot 🤩
@klaudia8323
@klaudia8323 3 жыл бұрын
So fun, i was figuring it out two days ago how to do that :D hope it will help some day :)
@ShanesCows
@ShanesCows 3 жыл бұрын
😎
@bertoso
@bertoso 2 жыл бұрын
Top Shane, você é muito foda! (you are very good)
@ShanesCows
@ShanesCows 2 жыл бұрын
Thanks Julio. 🐶
@stlaurent26
@stlaurent26 Жыл бұрын
Thank you, very helpful indeed
@ShanesCows
@ShanesCows Жыл бұрын
You're welcome!
@tonicassis619
@tonicassis619 3 жыл бұрын
great video Shane! You made me laugh at 23:43 - I've done that!
@ShanesCows
@ShanesCows 3 жыл бұрын
I find people enjoy my pain. :)
@novedadesgaytan9689
@novedadesgaytan9689 Жыл бұрын
Hi! It dosen't work for me: Remove(colTxtSal,ThisItem)
@wendymason3263
@wendymason3263 3 жыл бұрын
Thanks yet again Shane, just what I needed right now 😘
@ShanesCows
@ShanesCows 3 жыл бұрын
You are welcome Wendy! 🐶
@danielmacias5880
@danielmacias5880 2 жыл бұрын
Saved my back, like always, thanks
@ShanesCows
@ShanesCows 2 жыл бұрын
No problem!
@damianjohnson3057
@damianjohnson3057 3 жыл бұрын
Thanks for videos, some of the more helpful out there. Can we see a video showing how to Patch/Collect to a list form multiple combobox:)
@ShanesCows
@ShanesCows 3 жыл бұрын
I think you mean this video kzbin.info/www/bejne/naTOYmd6YqiMiKc
@damianjohnson3057
@damianjohnson3057 3 жыл бұрын
@@ShanesCows Many thanks for the pointers
@antoniomartinezjurado1223
@antoniomartinezjurado1223 2 жыл бұрын
Thanks so much from Spain. Your videos are amazing and you are my heroe. Best wishes for Christmas.
@Giu.Tanaka
@Giu.Tanaka 2 жыл бұрын
Perfect video, exactly what I needed!
@ShanesCows
@ShanesCows 2 жыл бұрын
Great to hear!
@adrianamartinez3383
@adrianamartinez3383 3 жыл бұрын
You rock Shane. Thanks for all the help!!
@ShanesCows
@ShanesCows 3 жыл бұрын
Glad to help. 😀
@muraligohan3322
@muraligohan3322 3 жыл бұрын
Hey Shane Great Video thanks for it. I have one question on confirm box if we Click on the delete button only data should remove . have you tried to click outside of confirm box. Scenario click delete icon on the gallery confirm box will pop up click outside on anywhere from confirm box on Rectangle its deletes data with out pressed button its removing the value.
@AkhileshKumar-fz9oz
@AkhileshKumar-fz9oz 2 жыл бұрын
Hi, Sir. I have made a service desk app from already given template using sharepoint... Problem is that i have to add and delete some items from sharepoint so that it suits my needs but I am pretty confused about how to add or delete items in sharepoint datasource so that it gets reflected in service desk powerapps... I can easily add or remove entry from sharepoint but it is not getting reflected in service desk app.. I need your guidance.. Thank you.
@jetys100
@jetys100 3 жыл бұрын
Great video at the right time! I was just looking for a solution how to delete items and subitems. But one remark: Could you please speak not so fast :-). As a non-native speaker it is sometimes very hard for me to follow your explanations
@ShanesCows
@ShanesCows 3 жыл бұрын
Sorry. I try not to but sometimes I get too excited. I will make a mental note to calm down. 😁
@jetys100
@jetys100 3 жыл бұрын
On question: Are there different versions of PowerApps? I am working in Germany with PowerApps and I copied your formulas. But everywhere where you enter a comma I have to enter a semicolon, and everywhere where you separate two formulas with a semicolon I have to enter two semicolons!?!?
@roberternst888
@roberternst888 3 жыл бұрын
@@jetys100 Hello Jürgen, That's not because of different versions, it is because of the "programming language" or system language. You will get used to it ;-)
@copeto220
@copeto220 3 жыл бұрын
Thanks Shane Young for the content, it is spectacular I have a problem and that is that when I execute this action it does not delete the record, the message I receive in the formula is "ThisItem = this formula uses the scope, which is not currently supported for evaluation "Thank you very much for your help, greetings from Colombia
@sidkhandelwal2066
@sidkhandelwal2066 3 жыл бұрын
Can You do video on how to delete a attachment from sharepoint list using powerapps button
@ardiland_tech
@ardiland_tech 3 жыл бұрын
Thank you , my hero!
@lukaslink4689
@lukaslink4689 2 жыл бұрын
Hi Shane, i try to remove the whole Data from a Colum but i don`t want to drop the Colum and i dont want to remove the whole table. Do you have an Idea?
@stevemcc7208
@stevemcc7208 Жыл бұрын
Hi Shane. Thanks for all these videos! My company asked me to make some flows but still insists on using Infopath for now. I have lookup lists but can't use them across multiple collections. So I am trying to make a flow that will copy/update/delete those items to the other sites where they serve as lookups. Not sure that's the smartest way, but I can't use power apps yet. Do you know if there is an easy way to Delete an item from a duplicate list, when we delete it from the primary list? Thanks!
@kirankatkar2665
@kirankatkar2665 3 жыл бұрын
Brilliant Shane ❤️.
@ShanesCows
@ShanesCows 3 жыл бұрын
Thanks.
@pericleszacariasabrahao6913
@pericleszacariasabrahao6913 2 жыл бұрын
bah
@sundrapillay6668
@sundrapillay6668 3 жыл бұрын
Thanks Shane
@ShanesCows
@ShanesCows 3 жыл бұрын
Of course :)
@TheToni2123
@TheToni2123 3 жыл бұрын
thx
@ShanesCows
@ShanesCows 3 жыл бұрын
You are welcome 🙏
@denis7369
@denis7369 3 жыл бұрын
Hi Shane, Thank you for the great content! About your code at 13:40, the remove part alone works fine, but when I put a semicolon and the second part where you setup the variable, it doesn't work anymore and I get the following message "This formula has side effects and cannot be evaluated". I can't figure out what am I doing wrong ...
@ShanesCows
@ShanesCows 3 жыл бұрын
Is it possible you are in a region that use a comma for the decimal separator? If that case when I use a , you need to use a ; and when I use a ; you need to use a ;;
Power Apps SharePoint Document Library Browser
31:17
Shane Young
Рет қаралды 103 М.
Power Apps Reset a Gallery and varRecord instead of Selected
8:08
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 69 МЛН
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 3,6 МЛН
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 67 МЛН
PowerApps List Relationships with SharePoint
25:41
Shane Young
Рет қаралды 8 М.
Use Document Libraries not Attachments with SharePoint
26:21
Shane Young
Рет қаралды 9 М.
Confirmation Popups Screens in PowerApps
10:38
Pragmatic Works
Рет қаралды 54 М.
PowerApps Repeating Tables like InfoPath Part 1 - Enter the data
31:12
Editable Grid in Power Apps | SharePoint List
42:49
Reza Dorrani
Рет қаралды 378 М.
Power Apps Combo Box DefaultSelectedItems
14:26
Shane Young
Рет қаралды 123 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 69 МЛН