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 / Filter Edit Form Looku...
Power Apps
Answered

Filter Edit Form Lookup field.

(0) ShareShare
ReportReport
Posted on by 145

Hi,

 

I have a PowerApp, Data source is CDS.

In the App, there is an EditForm. On creation of new record i want to filter a Lookup field(combo box).

 

Community7_1.png

 

The formula I used

Sort(Filter(Products, Status in "Active"), Name)

 There are more then 5000 records of Product Entity so it is showing Delegation warning.

Any guidance is appreciated

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at

    Hi @tjalui ,

    Firstly, the In filter is not delegable, so will not work on your data set size.

    If however you are looking for a matching record string, you can use

    Sort(
     Filter(
     Products, 
     StartsWith(Status, "Active")
     ), 
     Name
    )

    Please let me know if you require further explanation on this.

     

    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.

  • tjalui Profile Picture
    145 on at

    Hi @WarrenBelz  ,

     

    As you suggested, I used the formula but I am still getting an error.

    Below is the Screenshot of the error.

    Screenshot_10.png

     

    Please do guide me regarding the same as it is an urgent requirement.

  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at

    Hi @tjalui ,

    The syntax is correct - what type of field is Status and where are you getting the value from?

    Can you also give me the complete code of the Filter.

  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    Since this is CDS, you have a few options.

    • If this is a custom Product entity
      • Option 1: Create a filtered View, or use Default Active View
        • Filter([@Products],'Products (Views)'.'Active Products')
        • Set Items for that Combo Box equal to above
        • (Assuming entity name, and default view name is same)
      • Option 2: Filter using the Status (statecode) value
        • Filter([@Products],Status = 'Status (Products)'.Active)
        • Set Items for that Combo Box equal to above
        • (Assuming entity name, and status field/values are default)
    • If this is the OOB Product entity (assumes D365CE)
      • Same as above, but you'll have OOB Active Views and additional statecode values to consider

     

    Additionally, given the amount of records, I would set the IsSearchable property of the Combo Box to true, and set appropriate search columns.

  • tjalui Profile Picture
    145 on at

    Thanks @GarethPrisk 

     

    This works perferctly fine.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard