cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Choose the company to use in PowerApps

Hello all,

I have created a Microsoft SQL Server connection in PowerApps (we are using AX 2009 on premises), where I generated an app out of SMMBUSRELTABLE (CRM Business Relations Table).

However, I can see that the data source contains data from all the company.

How do I specify in my data source the company that I want to get data from?

Thanks in advance!

4 REPLIES 4
Advocate II
Advocate II

Is this issue in regards to security and hiding specific data from specific users, or would this issue be solved with a dropdown that users can select to filter the data?

 

If you can use a dropdown list with all the different company names, you can use the Distinct function in the Items property of the dropdown list:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-distinct

https://powerusers.microsoft.com/t5/General-Discussion/Filter-Duplicates-out-of-Drop-Down/td-p/77710

 

Am I misunderstanding?

Dual Super User III
Dual Super User III

Hi @rollyrulona 

 

If you want to get the details about a specific company from the datasource, you can use filter query to achieve this:
 
Sample Expression: Filter(DataSource,Company Name = "Company1")
 
Here, DataSource is the name of my data source. This returns a list of all the records which are associated to searched comapny. For more information about the Filter query, please refer: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @Akatamaoka and @yashag2255 

This is an issue of permission and "limitation". There are very few people who have permission to access all companies.

Additionally, I also only want to create an app from one specific company so filtering does not really help?

I suppose my data source will still contain data from all companies despite filtering because it simply "hides" it in PowerApps, is that correct?

Thanks in advance.

 

@rollyrulona 

 

Yes that is correct. Whatever data is present in the data source, the same will be available for filtration in the powerapps. One way to show only the relevant data to users is by using the Filter/Lookup/Search queries inside the application based on current logged-in user or some other criteria. If you want to categorize companies on the basis of users, you can add an additional column to uniquely point the users and then getting the results based on current user.
 
If you do not want to perform multiple data retrieval operations on the same data multiple times, then you can create a local collection based on the records available for current user and then use this collection throughout your app. If you need help with the specifics of your schema, please share more details so that we can help you better.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,368)