cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mpezzutti
Helper II
Helper II

CDS Creating a view across identity

Hello

In CDS

I have a table called Companies which has two fields one is called Company and the other is called user which contains the user email.

Is it possible to create a view where when the powerapp starts it filters automatically with a view of only companies which belong the user. 

 

I dont want to create a filter at the powerapp but rather at the entity level . Is this possible

 

Thanks

 

Marco

1 REPLY 1
HSheild
Super User
Super User

Hi @mpezzutti ,

 

You can do this by adjusting your Companies entity (table) slightly.  Instead of having a field that is the users email you can use the out-of-the-box Owner field which comes with each entity.  Using this field, you can then create a filtered view which has a condition to filter Companies where the Owner is equal to the current user.   Similar to how the OOTB "My Accounts" view works.

 

Then in your Power App, you can set the filtered view as part of the datasource so that Companies are pre-filtered rather than doing the filtering in the app.

https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/Use-filtered-subset-of-CDS-entity-a...

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (4,422)