I have an Excel file that has a list of sales account leads. The unique field in the data is the Full Name which is the contact manes at each of the companies. There are multiple entries for a specific Account Name - Company as I have been given multiple lead-contacts per company to reach out to. I love the new "Ideas" in Power Apps where they attempt to help users build querries but It is in it's infancy. Here is what I am trying to do:
Sort(Distinct('Table1', 'FullName'), Result, Ascending) group by AccountName.
I want my results to be grouped and sorted by AccountName and list the Contact names for each account within that account and each would have the usual arrow to go to the details of that unique "FullName" data entry.
The results should look like this:
Santa Cruz Software company (AccountName)
Brian Jones (FullName) >
David Super (FullName) >
Flambeau (AccountName)
Alejandro Rosado (FullName) >
Basil Ledet (FullName) >
Tom Kimble (FullName) >
David Rutzler (FullName) >
Is this even possible with a sort and group query or do these one-to-many relationships need to be separated into separate lists?
I am hoping a query can solve this because this is how we are being given the data...
I have attached the Excel file AccountLeads.xlsx
You need the GroupBy structure I posted with a nested gallery containing the Data table.
Warren - I have this working (distinct sort 'AccountName') which gives me the first screen looking good except where I am challenged is the arrows no longer work as one account name may point to multiple user accounts. I assume I will need to create a custom next page that loads up the account details and then lists the people/contacts within that account. I am lost as to how to pass that data across and to make the initial arrow function correctly (pass on the AccountName.
The principle is the same - just you would have different data source and field names.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
It is made up sample data. I was hoping it would help.
Hi @SebS ,
You did not say how you connecting this, but assuming direct to the Excel file, you would have a Gallery with the Items
GroupBy(
Table1,
"AccountName",
"Data"
)
then a nested gallery inside this with the Items
ThisItem.Data
and Labels inside that for all the fields (except AccountName which is in the main gallery)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
I really hope this is sample data and You just not breached GDPR but just in case if it's not a sample remove the file and replace it with some fake data 🙂