cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Users online (92,010)