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

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

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,727)