cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

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
Highlighted
Resident Rockstar
Resident Rockstar

@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
Highlighted
Resident Rockstar
Resident Rockstar

@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

Highlighted

Thanks for your input, @KroonOfficeSol

 

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (2,252)