Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Filter from a CDS View in a Gallery

(1) ShareShare
ReportReport
Posted on by 19

I am trying to use a CDS view as the items source for a gallery, then apply a filter function in the app based on user input.

 

My formula in the gallery's Items property:

 

Filter('Entity Name', 'Entity Name (Views)'.'View Name', 'Record Date' >= 'Date Picker Control'.SelectedDate)

 

Currently, the formula erroneously yields no results. If I remove the Date test from the formula, I get see results based on the view's sort and filter parameters, which I pre-set in the CDS View Designer. Those view-based sort/filter parameters are based on different fields than those being tested by any app controls. I tried swapping the Date test for a different field/data type/control, and had the same issue.

 

What's weird is that, when I set the gallery's items source as the CDS view, I get this error - "The specified record was not found. Server response: userid is empty guid!" Even when the gallery is successfully displaying records, using the view's preset sort/filter parameters, this error comes up. It can't be a delegation issue because I'm querying <500 records.

 

What gives?

  • Ryan S Newcomb Profile Picture
    234 on at
    Re: Filter from a CDS View in a Gallery
    Can you try using this for your gallery items?

    Filter([@‘Entity Name'], 'Entity Name (Views)'.'View Name', 'Record Date' >= 'Date Picker Control'.SelectedDate)

    I wrapped the entity name to disambig and it worked on my end.

    So the data source should be [@‘Entity Name’] instead of just ‘Entity Name’
  • jschroder Profile Picture
    3 on at
    Re: Filter from a CDS View in a Gallery

    Is the field on which you filter part of the view?

  • jrtpts Profile Picture
    19 on at
    Re: Filter from a CDS View in a Gallery

    Thanks for your assistance, unfortunately the issue remains.

     

    'Record Date' is Date-Only datatype is CDS. I've tried a text field as filter, and it yields the correct records, in the view's sort order, but I still have the "The specified record was not found. Server response: userid is empty guid!" error in the formula.

     

    I changed the screen's name and I turned off Delayed Load, but didn't see a setting for improved app rendering. After publishing, I'm still seeing the same issue. 

     

  • v-yutliu-msft Profile Picture
    on at
    Re: Filter from a CDS View in a Gallery

    Hi @jrtpts m

    Could you tell me the data type of 'Record Date'?

    I've made a similar test but not met similar problem like your description.

    Here's my test:

    SET THE GALLERY'S ITEMS:

    Filter(testmanies,'testmanies (Views)'.'testmany Lookup View',Name="abc")

     Name is text type in my test. 'testmany Lookup View' is a view of testmanies entity.

    And my gallery display correctly.

    127.PNG

     

    I've found a similar issue that may help you:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Failed-to-load-resource-The-specified-record-was-not-found/td-p/212064

    Please consider take a try to rename the screen name into a different name, then re-publish your app, check if the issue is solved.

    In addition, please consider take a try to turn off "Delayed load" option and "Improved app rendering (final validation)" option within Advanced settings of App setting of your app, re-publish your app, check if the issue is solved.

     

     

    Best regards,

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics