cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

RemoveIf with variable Sharepoint List

Hello,

Quite new to this, and hoping to get some help here 🙂 We are using a couple of SP Lists (by departments) to overcome the delegation limit of Powerapps.

 

So far, I've been using Filters, LookUps and Patch with the Switch function and they are working well:

Switch
(
           employeeLookupList,
           "Group1List",
           'Group1_List',
           "Group2List",
            'Group2_List'
)
 
But when I tried to remove a particular row within a particular list by RemoveIf (or Remove), this Switch is not able to work:
 
RemoveIf (
Switch
(
           employeeLookupList,
           "Group1List",
           'Group1_List',
           "Group2List",
            'Group2_List'
)
,ID=idtodelete)
 
Is there any workaround to this? Or am I doing this wrongly? Thanks very much in advance!
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: RemoveIf with variable Sharepoint List

Hi @knoxknnocks ,

With two options, I would probably go for something a bit bulkier, but should work

Switch(
   employeeLookupList
   "Group1List",
   RemoveIf(
      Group1_List,
      ID=idtodelete
   ),
   "Group2List",
    RemoveIf(
       'Group2_List',
       ID=idtodelete
   )
)

 

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.

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: RemoveIf with variable Sharepoint List

Hi @knoxknnocks ,

With two options, I would probably go for something a bit bulkier, but should work

Switch(
   employeeLookupList
   "Group1List",
   RemoveIf(
      Group1_List,
      ID=idtodelete
   ),
   "Group2List",
    RemoveIf(
       'Group2_List',
       ID=idtodelete
   )
)

 

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.

View solution in original post

Highlighted
Frequent Visitor

Re: RemoveIf with variable Sharepoint List

That worked beautifully Warren. Thanks so much for your help!

 

We do have about 25 of these lists that we switch around. I think I can work with this solution. Just a bit tedious and lots of lines of code 🙂

 

Thanks again!

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,383)