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

Load sequence

 

I have a simple app, that loads a bunch of records in a gallery on the Start Screen. 

 

When the user searches for records in the gallery and there are no mathcing records, I display this message:

Capture.PNG

using a formula as below on the Visible property:

If(CountRows(Gallery.AllItems) = 0, true, false)

The issue is, that the message displays when the app is loaded, because no records has been fetched by the gallery by then. Is there anyway I can set the sequence of the formulas? E.g., first run the query of the gallery - and afterwards run the formula above?

1 ACCEPTED SOLUTION

Accepted Solutions
KroonOfficeSol
Level 10

Re: Load sequence

@NielsL

 

This is not possible. You could do several thinks to get this working:

1) ClearCollect() your table in a collection and add a IF() formula to control your image like:

If(!OnStartTrue,
	// do your sequence
	UpdateContext({OnStartTrue:true})
)

Then on you image.visible

OnStartTrue && CountRows(Gallery.AllItems) = 0

Yes, lose the IF() here, your condition has true/false as a result.

2. Add a timer which you tricker on the start off your app. On the Timer.End you set your variable OnStartTrue. Give it 1-2 seconds to give PowerApps the time to load the gallery.

 

Hope this helps.

 

Paul  

 

 

View solution in original post

2 REPLIES 2
KroonOfficeSol
Level 10

Re: Load sequence

@NielsL

 

This is not possible. You could do several thinks to get this working:

1) ClearCollect() your table in a collection and add a IF() formula to control your image like:

If(!OnStartTrue,
	// do your sequence
	UpdateContext({OnStartTrue:true})
)

Then on you image.visible

OnStartTrue && CountRows(Gallery.AllItems) = 0

Yes, lose the IF() here, your condition has true/false as a result.

2. Add a timer which you tricker on the start off your app. On the Timer.End you set your variable OnStartTrue. Give it 1-2 seconds to give PowerApps the time to load the gallery.

 

Hope this helps.

 

Paul  

 

 

View solution in original post

NielsL
Level: Powered On

Re: Load sequence

Thanks for your input, @KroonOfficeSol

 

Using a timer seems to do the job for me. Thanks. 

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 (5,418)