web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Choose the company to ...
Power Apps
Unanswered

Choose the company to use in PowerApps

(0) ShareShare
ReportReport
Posted on by 10

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!

Categories:
I have the same question (0)
  • Akatamaoka Profile Picture
    13 on at

    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?

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!

  • Rolly R Profile Picture
    10 on at

    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.

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard