cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rollyrulona
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
Akatamaoka
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?

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
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.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,930)