web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delete value if not us...
Power Apps
Answered

Delete value if not used in another list

(0) ShareShare
ReportReport
Posted on by 129

Hello,

 

I want to delete some value if I don't used them in other list, to put it simply, I have 2 list, one has a text column where I enter my data and the other list with a lookup column where I can use the data I enter previously.

 

For exemple, if I create a data named "Day"  don't use it If I create a data item called "Day" and I don't use it, I must be able to delete it and if I do use it, I must not be able to delete it.

 

I hope to be clear in my explanation,

Thanks in advance!

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @TomVictor ,

     

    To do this in Power Apps, let's call the list with the values the ParentList and the list with the LookUps the ChildList.

     

    Insert a gallery in Power Apps and set its' Items property to:

    Filter(
     ParentList,
     Not(ParentColumnName in ChildList.ChildColumnName.Value)
    )

    This will display all items in ParentList that don't have a match in ParentColumnName in ChildList.ChildColumnName (which is the LookUp column).

     

    This formula will give you a delegation warning, but as long as you don't have more than 2000 items in ParentList, this is not an issue.

     

    Finally you can choose to add a remove button inside the gallery to be able to delete individual items (OnSelect = Remove(ParentList, ThisItem) ) and/or add a button outside the gallery to remove all items (OnSelect = RemoveIf(ParentList, ID in GalleryName.AllItems.ID) ).

  • CU22100725-0 Profile Picture
    129 on at

    Hi @BCBuizer ,

     

    Thanks for your reply, I have a problem with your first formula, It tells me "Value is not recognised". 


    How can I fix it ?

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @TomVictor ,

     

    Did you replace ParentList, ParentColumnName, ChildList and ChildColumn name with their actual names?

     

    For clarification on what I'm referring to:

     

    ParentList: The list with the Text type column in it

    ParentColumnName: the Text type column

    ChildList: The list with the LookUp type column in it

    ChildColumnName: The LookUp column

  • CU22100725-0 Profile Picture
    129 on at

    Hi @BCBuizer ,

     

    I replace ParentList, ParentColumnName, ChildList and ChildColumn name with their actual name like this :

    Filter(
     'CRM - Paramètre Unité';
     Not(Unité in 'CRM - Lignes commandes'.Unite.Value))

     

    I don't see where is my mistake.

     

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @TomVictor ,

     

    It seems that the in operator does not like working with complex types. Can you please try this:

     

    Filter(
     'CRM - Paramètre Unité';
     Not('CRM - Paramètre Unité'. Unité in AddColumns('CRM - Lignes commandes'; "vUnite"; Unite.Value).vUnite)
    )

    Basically it adds a column to the ChildList with the value of the LookUp column as plain text. This can then be used to filter the ParentList.

  • CU22100725-0 Profile Picture
    129 on at

    Hi @BCBuizer,

     

    I try and it still not working, "Impossible to convert this type of data", that's what my PowerApps said.

    May be it's a problem with my ParentList ?

  • Verified answer
    BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @TomVictor ,

     

    I think I was able to replicate the issue in my tests. Can you please try:

     

    Filter(
     'CRM - Paramètre Unité' As ParentList;
     Not(ParentList.Unité in AddColumns('CRM - Lignes commandes'; "vUnite"; Unite.Value).vUnite)
    )

     

  • CU22100725-0 Profile Picture
    129 on at

    Hi @BCBuizer,

     

    It works perfectly now, thanks for your help !

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard