cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tddeacon
Regular Visitor

Published canvas app not showing same data as Development - same data source

Hi folks,

I have a canvas app which works locally when searching a collection and yet fails to find the same data using the published version. The SQL data sources are identical and I understand the delegation (or at least I think I do!) limits me to 2000 rows per lookup (default up from 500). I have just under 6000 rows so, in sql I have created specific views which return rows 0-2000, 2001-4000, 4001-6000 of a table. I then create a collection in the canvas app using those data sources as below and then my Filtering uses that colEsrStaff collection. 

Really baffled as to why it works in edit mode but not in published - ideas anyone? 

 

Screen onVisible:

ClearCollect(colEsrStaff,'[uvwEsrStaff2000]');
Collect(colEsrStaff,'[uvwEsrStaff4000]');
Collect(colEsrStaff,'[uvwEsrStaff6000]');
 
The gallery uses this snippet 
Items:
If(
!IsBlank(StaffListNameSearchInput.Text),
If(
Find(
" ",
StaffListNameSearchInput.Text
) > 0,
Sort(
Sort(
Filter(
colEsrStaff,
StaffListNameSearchInput.Text in Firstname & " " & LastName
),
LastName
),
Firstname
),
//else
Sort(
Sort(
Filter(
colEsrStaff,
StaffListNameSearchInput.Text in Firstname || StaffListNameSearchInput.Text in LastName || StaffListNameSearchInput.Text in EmployeeNo
),
LastName
),
Firstname
)
)
)
1 ACCEPTED SOLUTION

Accepted Solutions

Hi Catherine,

That does look exactly the same I agree.

If I set the collection to any of the 3 in turn, it works. So it has to be something to do with expanding/adding to the collection, maybe..

View solution in original post

4 REPLIES 4
PowerAddict
Super User
Super User

Hi @tddeacon 

 

Is this the 1st screen in your app? If so, have you tried placing this code in the app's OnStart property? And when you play the published app, does your collection have any data in it or is it blank?

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

Catherine
Frequent Visitor

I had a similar scenario as you do. In my case, I need to lookup all cities by country/state in the world which over 20000 in some Dropdowns, the formulas in OnVisible to get all data is like this:

ClearCollect(WorldCitiesAll, WorldCities);
Collect(WorldCitiesAll,WorldCities2)

 

And the datasource of cities is Excel file.  It works fine in Edit mode and published mode. You can try set the Items of gallery just "colEsrStaff"  to check if works fine in edit and published, if it is, then add formulas one by one to check which one is the block.

 

Hi Hardit,

Yes I did try having the code in the App start up but moved it to the search screen which is not the first screen. The data appears correctly for only the first part of the collection - it seems adding to the collection does not work in published. If I set the collection to any of the 3 in turn, it works. So it has to be something to do with expanding/adding to the collection, maybe..

Hi Catherine,

That does look exactly the same I agree.

If I set the collection to any of the 3 in turn, it works. So it has to be something to do with expanding/adding to the collection, maybe..

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,221)