cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rollyrulona
Level: Powered On

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
Akatamaoka
Level: Powered On

Re: Choose the company to use in PowerApps

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?

Super User
Super User

Re: Choose the company to use in PowerApps

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!

rollyrulona
Level: Powered On

Re: Choose the company to use in PowerApps

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.

 

Super User
Super User

Re: Choose the company to use in PowerApps

@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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 184 members 5,561 guests
Please welcome our newest community members: