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
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,887)