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 / Use View instead of Ta...
Power Apps
Answered

Use View instead of Table as Gallery item

(0) ShareShare
ReportReport
Posted on by 100

I'm running into a lot of issues trying to build an app, but I'll start with this one: if I use Table1 in a gallery, it works fine, but the Filter() conditions I need to add (so people can filter it with dropdowns) means I run into delegation issues. I have a view of that table that has all those criteria built in, but I can't seem to use it for Gallery items - I get "Expected table value."

 

Edit: these are views built directly within PowerApps via going to Data > Tables > Views. Data source is Dynamics data via CDS.

 

Any help? Thanks! 

 

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @RMDNA 

    If you're referring to a SharePoint view, then no, you cannot use them.

    If you can perhaps provide the formula you are getting warnings in, perhaps some help can be given on how to correct the issues.   Also, since you mention the dropdowns, also provide the Items properties for the dropdowns.

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @RMDNA 

    Please provide more details.  Where is your table coming from,(Excel, SharePoint, Dataverse)?  How are you filtering your table.  Please show a screenshot with the controls and provide the problematic filtered items property for your gallery.

  • RMDNA Profile Picture
    100 on at

    Hi @RandyHayes ,

     

    Error is here, just "expected table result". I can't figure out if there's a way to reference the view like a table.

     

    RMDNA_0-1616170865559.png

     

    I'm just referring to views built within PowerApps, going Data > Tables > Views.

     

    RMDNA_1-1616170291817.png

     

    @Drrickryp - data via CDS, originally from Dynamics. The filters that get me delegation errors are because I'm trying to filter text. I looked, but wasn't able to find a way to filter by text other than using in. It's a valid formula and works fine, but runs up against the table load limits, so I don't get all the data I need. This version exists only because I can't get the view mentioned above to work.

     

    Items = SortByColumns(Filter('Project Approval',Date > DatePickerStart.SelectedDate && Date < DatePickerEnd.SelectedDate && Status in StatusDropdown.Selected.Result && Project in ProjectDropdown.Selected.Result),"msdyn_date", Ascending)

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @RMDNA 

    So, unfortunately you cannot use an associated view from CDS/Dataverse in your app.  They really only work in context of a record.

     

    So, you mention that you have Dropdowns...are they really Dropdown controls or Comboboxes?  I am going to go with the assumption that they are Dropdown controls.

    Your formula should be this:

    SortByColumns(
     Filter('Project Approval',
     Date > DatePickerStart.SelectedDate && 
     Date < DatePickerEnd.SelectedDate && 
     Status = StatusDropdown.Selected.Result && 
     Project = ProjectDropdown.Selected.Result
     ),
     "msdyn_date"
    )
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    HI @RMDNA 

    When you are setting the datasource for your gallery, you can select a view here:

    1.jpg

    and PowerApps should supply the correct filter to your gallery Items property. If you are using option sets for your fields, check out Shane Young's video on them in CDS.  https://www.youtube.com/watch?v=1L633HIvNGE 

  • RMDNA Profile Picture
    100 on at

    @Drrickryp - I've seen that in other elements, but in my UI, I only get data source and fields, not views. That's partially why I was confused if it was possible.

     

    RMDNA_0-1616173680950.png

     

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Drrickryp 

    Good to know!  I've not seen that in the Gallery before.  I see it ONLY appears if the Gallery datasource has not been changed to anything else once the Gallery is added.

    I also see that it adds the proper Filter for it.

    Sweet!

  • RMDNA Profile Picture
    100 on at

    @RandyHayes + @Drrickryp - going off both of your findings, I created a new gallery from scratch and was able to select a view. Criteria is a bit confusing, but that solves the issue. Thanks!

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @RMDNA

    First, refresh the datasource in your app.  Then, if that doesn't work, restart the app and check it again.  However, when I select the view in my app it provides the following formula for the Items in the Customer table. 

    Filter(Customers, 'Customers (Views)'.'Active Customers')

     You may want to try it manually first and see if it works.  

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard