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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Correct Syntax to Refe...
Power Apps
Unanswered

Correct Syntax to Reference a Dataverse View?

(0) ShareShare
ReportReport
Posted on by 311

I am struggling with this Function to show an object as Visible (on a Calendar) by attempting to access a View that I have published for a Dataverse Table:

 

CountRows(
Filter(
Sort(
'Dataverse Table Name (Views)'.ViewName,
Due_Date,
SortOrder.Ascending
),
(DateValue(Text(Due_Date)) >= DateAdd(Today(), -120, TimeUnit.Days) &&
DateValue(Text(Due_Date)) <= DateAdd(Today(), 365, TimeUnit.Days)),
(DateValue(Text(Due_Date)) = DateAdd(
_firstDayInView,
ThisItem.Value,
TimeUnit.Days
)),
(Lower(Email) = Lower(Delegated) ||
Lower(Email) = Lower(Allocated) ||
Lower(Email) = Lower(Administered) ||
Lower(Email) = Lower(Managed) ||
Lower(Email) = Lower(Reporting) ||
Lower(Email) = Lower(Governed))
)
) && !Subcircle2.Visible && Title6.Visible

 

In one instance, PowerApps validates by allowing me to add the View Name, by showing it as one of the valid items in the selection panel at the bottom of the function panel - but then it tells me it is not valid - and that none of the Column Names I am using from the View are recognized.

 

I thought it might be because I am attempting to Filter > Sort a View (?), which I then removed, like this:

CountRows

( 'Dataverse Table Name (Views)'.ViewName,

(DateValue(Text(Due_Date)) = DateAdd(

_firstDayInView,

ThisItem.Value,

TimeUnit.Days

)),

(Lower(ELC_Email) = Lower(Delegated)

|| Lower(ELC_Email) = Lower(Allocated)

|| Lower(ELC_Email) = Lower(Administered)

|| Lower(ELC_Email) = Lower(Managed) ||

Lower(ELC_Email) = Lower(Reporting) ||

Lower(ELC_Email) = Lower(Governed)))

&& !Subcircle2.Visible && Title6.Visible

 

But still PowerApps allows me to add the View Name and then tells me it is not recognized - along with not recognizing any of the Column Names.

 

Is my syntax to refer to a Dataverse Table View correct or should I be using some other method?

Thanks!

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,452 Super User 2025 Season 2 on at

    @AdamGill1965 

     

    Type it like this for example

    Sort(Rests, 'Rests (Views)'.'Active Rests', "My Field");

     

    where you have the full table Name, TableName (Views).ViewName


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • AdamGill1965 Profile Picture
    311 on at

    Your response echoes what I am already entering - where PowerApps is not recognizing the View name, after it suggested it in the Function creation area.

     

    Thanks but this is not the key to the issue I was looking for.

  • Michael E. Gernaey Profile Picture
    53,452 Super User 2025 Season 2 on at

    Hi @AdamGill1965 

     

    Actually you are NOT typing what I typed at all, read my response again

     

    You have

    Sort(
    'Dataverse Table Name (Views)'.ViewName,

     

    I have

    Sort(

    Rests, 'Rests (Views)'.'Active Rests',

     

    They aren't even close to the Same thing.
    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • AdamGill1965 Profile Picture
    311 on at

    I will attempt to recreate from your example and I will return to this thread with my results.

     

    Thanks,

    Adam

  • AdamGill1965 Profile Picture
    311 on at

    I tweaked your suggestion and the View reference works. However, the Filters I have applied in the View appear to be constricting themselves to a sub-set of the Table. For example: When I apply a Filter on a Date Value Type Column, it only returns a small amount of records, when I know that the main Dataverse Table contains many more. Is there a setting in Dataverse Views which is constraining the View parameters to a limited number of Rows in the underlying Table, perhaps?

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard