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

PowerApps Data Binding to multiple sets of fields

Hi all experts,

 

I have this design requirement looks like the attached image - mockup.png. A sample dataset is also attached to this message - data.xlsx. The actual data is from SQL Server which is updated every 10 mins.

 

I want to know if it can be done in PowerApps. If yes, how do I bind data from the data source to the each form field? Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: PowerApps Data Binding to multiple sets of fields

Hi @mochabits,

I believe that you can achieve your goal using powerapps and sql.  The basics would use the GroupBy() function along with sort and filter.  I was able to construct the following app using the data you provided.Capture.PNG

This screen contains 2 galleries, each with a subgallery. Looking at the upper gallery (City001),  The items property of the outer gallery is a standard Vertical gallery

GroupBy(Filter(Table1,Value(City)=001),"Grid ID","Restofdata")

The label's Text in this gallery is "Grid ID: "&'Grid ID' .  Beneath the label is a Horizontal subgallery with an Items property of Restofdata.  In the subgallery, there are two labels 'Service ' and beneath it 'Wait time'.

 

The lower gallery (City002) is a duplicate of the upper one but with the items property

GroupBy(Filter(Table1,City*1=002),"Grid ID","Restofdata")

I believe this is the look you want.  However, in order to maintain your requirement that the tables be updated every 10 min.  you will need to sort the Table data by wrapping the filter as follows:

GroupBy(Filter(First(Sort(Table1,ID,Descending)),City*1=002),"Grid ID","Restofdata")

A timer control could be used to refresh the connector at the appropriate times.  As the data in your table will quickly overwhelm PA's delegation restriction (2000 records) on Last(), Max(), etc, by sorting the data descending and then selecting the First record in the table, you can avoid the delegation problems, even if your table is millions of records.  I hope this gives you a start for your design.  Please mark the thread as solved if it answers your question.

View solution in original post

1 REPLY 1
Highlighted
Super User
Super User

Re: PowerApps Data Binding to multiple sets of fields

Hi @mochabits,

I believe that you can achieve your goal using powerapps and sql.  The basics would use the GroupBy() function along with sort and filter.  I was able to construct the following app using the data you provided.Capture.PNG

This screen contains 2 galleries, each with a subgallery. Looking at the upper gallery (City001),  The items property of the outer gallery is a standard Vertical gallery

GroupBy(Filter(Table1,Value(City)=001),"Grid ID","Restofdata")

The label's Text in this gallery is "Grid ID: "&'Grid ID' .  Beneath the label is a Horizontal subgallery with an Items property of Restofdata.  In the subgallery, there are two labels 'Service ' and beneath it 'Wait time'.

 

The lower gallery (City002) is a duplicate of the upper one but with the items property

GroupBy(Filter(Table1,City*1=002),"Grid ID","Restofdata")

I believe this is the look you want.  However, in order to maintain your requirement that the tables be updated every 10 min.  you will need to sort the Table data by wrapping the filter as follows:

GroupBy(Filter(First(Sort(Table1,ID,Descending)),City*1=002),"Grid ID","Restofdata")

A timer control could be used to refresh the connector at the appropriate times.  As the data in your table will quickly overwhelm PA's delegation restriction (2000 records) on Last(), Max(), etc, by sorting the data descending and then selecting the First record in the table, you can avoid the delegation problems, even if your table is millions of records.  I hope this gives you a start for your design.  Please mark the thread as solved if it answers your question.

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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