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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering List A for t...
Power Apps
Suggested Answer

Filtering List A for the items that are not in List B

(1) ShareShare
ReportReport
Posted on by 35
I have two lists: List A and List B. List A has Project Number column (Single line of text) and List B has Project Number column (Lookup Column) pulling data from List A. For List B, I have SharePoint integrated form and in that form for Project Number(Lookup Column), I want to show only Project Numbers that are in List A but there is no existing item of same Project number in List B (i.e. the Project numbers that are in List A but not in List B). I need help in filetring the project Number.
 
Should I create a collection for List B Project Number column so filtering doesn't impact the form performance. I am also trying to avoid delegation in Filtering the Project Column.
I appreciate any help on it.
I have the same question (0)
  • Suggested answer
    Inogic Profile Picture
    1,135 Moderator on at
    Hi,
     
    To achieve this in your Canvas App, you can:
    1. Create a collection for List B's Project Numbers to improve performance and avoid delegation issues.
    2. Filter List A to show only Project Numbers not used in List B.
    Step-by-Step Solution

    1. Create a Collection for List B Project Numbers
    This will store all existing Project Numbers from List B.
    ClearCollect(
        colListBProjectNumbers,
        ShowColumns(ListB, "ProjectNumber")  // Assuming "ProjectNumber" is the lookup column's name
    )
    Run this on the app's start (OnStart) or when the form loads.

    2. Filter List A for Available Project Numbers
    Use this filtered data as the Items property of the dropdown or combo box for the Project Number lookup.
    Filter(
        ListA,
        !(ProjectNumber in colListBProjectNumbers.ProjectNumber)
    )
    This filters out any Project Numbers already present in List B.
    3. Set the Dropdown/Combo Box Items
    If you're using a ComboBox for the Project Number in List B’s form, set its Items property to:
    Filter(
        ListA,
        !(ProjectNumber in colListBProjectNumbers.ProjectNumber)
    )
    For a Dropdown:
    Distinct(
        Filter(ListA, !(ProjectNumber in colListBProjectNumbers.ProjectNumber)),
        ProjectNumber
    )

    Why Use a Collection?
    • It improves performance by reducing delegation issues.
    • Collections are loaded once and used locally, making filtering faster.
    Hope this helps.
     

    Thanks!

    Inogic Professional Services: Power Platform/Dynamics 365 CRM
    An expert technical extension for your techno-functional business needs
    Drop an email at crm@inogic.com 
    Service: https://www.inogic.com/services/ 
    Tips and Tricks: https://www.inogic.com/blog/ 

     
  • MS-19111917-0 Profile Picture
    35 on at
    Thank you for your response @Inogic. My List A has more than 2500 items. For step, 2 and 3 (Filter(
        ListA,
        !(ProjectNumber in colListBProjectNumbers.ProjectNumber)
    )) can we use delegable function? 'In' doesn't pull all the data from the list. Could you please help with Delegation?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 279 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 229 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard