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

Published app performing differently to app in editor

Hi all,

 

I'm having an issue with a collection taken from an SQL table, where the data in ONE column is just not being picked up. The column type in the database is an nvarchar(50) and it stores the "category" of an event in string format. The column is picked up absolutely fine when looking at the app in the editor, however, upon viewing the published app it does not work as expected.

 

I have a gallery displaying events like such:

Capture gallery_1.PNG

 
The colour of the strip on the right of an event changes according to the category of event i.e. "Recruitment" is orange, "Social" is green etc. However, when I view the published application, it breaks and looks like the following:

Capture gallery_2.PNG

 

As you can see, the strips are displayed as black because for some reason, the category string being pulled is completely empty (I tested this by printing out the category as the title of each event, and found that they were all blank).

Also to note, I am caching the data of the events on the OnVisible property of the page as follows:

    Refresh('[dbo].[Event]'),
    ClearCollect(Events, '[dbo].[Event]');

And when I test it WITHOUT caching, it works absolutely fine on the published version of the application. Ideally, I need it to be cached because I construct some specific collections on the app startup based on table joins.

Side note: There are only 7 entries in the table, and I'm filtering to view 3 of them, so surely it can't be a data limit? 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Published app performing differently to app in editor

Hi @HarrisonChilds

 

Can you confirm if "Explict column selection" is set to "on"? If so, could you try turning it off to see if that solves your problem.

 

image.png

3 REPLIES 3
Super User
Super User

Re: Published app performing differently to app in editor

Hi @HarrisonChilds

 

Can you confirm if "Explict column selection" is set to "on"? If so, could you try turning it off to see if that solves your problem.

 

image.png

HarrisonChilds
Level: Powered On

Re: Published app performing differently to app in editor

@timl

 

That was exactly the issue. It must've been because I wasn't explicitly using the column, but rather it was used in an If statement to determine the colour:

 

LookUp(categoryColours, label = ThisItem.Category, colour).

 

Thank you for your assistance

LRVinNC
Level: Powered On

Re: Published app performing differently to app in editor

Moved to a new message.