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

Gallery not showing images properly

Hello,

 

I am having an issue where the gallery on my apps' main page is not showing images properly. This propblem is intermittent; sometimes it's all good, other times the images are all out of wack. 

 

Details: 

1. I have a collection of my main data in the OnVisible field of the main page with a few addcolumns from other tables, including the images. All the added columns work properly except for the images.

 

2. Once I drill down into the gallery to update the record (in a new screen) the image is correct. 

 

3. If the image is blank (none associated to the record), it seems to pick one at random.

 

Is that a table I'm seeing in my collection?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Gallery not showing images properly

Hi @marksmyth ,

Could yuo please share a bit more about the data structure of your ''[dbo].[vFunctionCodeFilteredByMobileEquipment]' table?

Could you please share a bit more about the FUN_PIC column? Is it a Image type column, or nvarchar(max) type column?

 

Based on the formula that you mentioned, I think there is something wrong with your formula. The result the last LookUp formula (for 'funpic' column) should return a text value, but within your Collection data structure, the funpic column is a Table data.

I also found that there is something issue with the RenameColumns() function you used within your formula. Please consider take a try to modify your formula as below:

ClearCollect(
arretequp, AddColumns(
'[dbo].[DOWN_TIME]', "daysdown", Round(Today()-DATE_STOP,0), "funcode", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID= '[dbo].[DOWN_TIME]'[@FUNC_ID]).FUN_CODE, "fundesc", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID= '[dbo].[DOWN_TIME]'[@FUNC_ID]).FUN_DESCR, "funpic", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID = '[dbo].[DOWN_TIME]'[@FUNC_ID]).FUN_PIC
)
)

Or

ClearCollect(
            arretequp,
            AddColumns(
                       RenameColumns('[dbo].[DOWN_TIME]', "FUN_ID", "FUNC_ID"),   /* <-- Use your RenameColumns() function here , rather than with your '[dbo].[vFunctionCodeFilteredByMobileEquipment]' table */
                       "daysdown", Round(Today()-DATE_STOP,0),
                       "funcode", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID= FUNC_ID).FUN_CODE,
                       "fundesc", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID= FUNC_ID).FUN_DESCR,
                       "funpic", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID = FUNC_ID).FUN_PIC
           )
)

Please take a try with above formula, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Gallery not showing images properly

@marksmyth

That is a table you are seeing.  If it was just an image, it would show the image.

What do you see when you click and drill into the table?

Have a look at your AddColumns formula to see what kind of image you are adding to that column...it's obviously coming back as a table.

 

I hope that helps point you in the right direction.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
marksmyth
Level: Powered On

Re: Gallery not showing images properly

@RandyHayes 

 

Nothing happens when I try to drill into the table. 

 

Here is my collection formula:

 

ClearCollect(arretequp,

AddColumns('[dbo].[DOWN_TIME]',

"daysdown",Round(Today()-DATE_STOP,0),

"funcode",LookUp(RenameColumns('[dbo].[vFunctionCodeFilteredByMobileEquipment]',"FUN_ID","FUNC_ID"),FUN_ID=FUNC_ID,FUN_CODE),

"fundesc",LookUp(RenameColumns('[dbo].[vFunctionCodeFilteredByMobileEquipment]',"FUN_ID","FUNC_ID"),FUN_ID=FUNC_ID,FUN_DESCR),

"funpic",LookUp(RenameColumns('[dbo].[vFunctionCodeFilteredByMobileEquipment]',"FUN_ID","FUNC_ID"),FUN_ID=FUNC_ID,FUN_PIC)))

 

I use RenameColumns because I use the column name FUN_ID in both tables.

 

I find it weird that I only get a table for the "funpic" added column :s ...

 

 

Super User
Super User

Re: Gallery not showing images properly

@marksmyth 

So, how is your column defined in your database?  That would be the place to look, because, from your formula standpoint, it should be fine.

 

By the way, you can use the disambiguation operator to avoid having to rename columns like you mention.  Not an operational issue in this case, but something to consider from a performance and "clean" formula perspective. 

   LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]', FUNC_ID='[dbo].[DOWN_TIME]'[@FUNC_ID],FUN_PIC)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: Gallery not showing images properly

Hi @marksmyth ,

Could yuo please share a bit more about the data structure of your ''[dbo].[vFunctionCodeFilteredByMobileEquipment]' table?

Could you please share a bit more about the FUN_PIC column? Is it a Image type column, or nvarchar(max) type column?

 

Based on the formula that you mentioned, I think there is something wrong with your formula. The result the last LookUp formula (for 'funpic' column) should return a text value, but within your Collection data structure, the funpic column is a Table data.

I also found that there is something issue with the RenameColumns() function you used within your formula. Please consider take a try to modify your formula as below:

ClearCollect(
arretequp, AddColumns(
'[dbo].[DOWN_TIME]', "daysdown", Round(Today()-DATE_STOP,0), "funcode", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID= '[dbo].[DOWN_TIME]'[@FUNC_ID]).FUN_CODE, "fundesc", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID= '[dbo].[DOWN_TIME]'[@FUNC_ID]).FUN_DESCR, "funpic", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID = '[dbo].[DOWN_TIME]'[@FUNC_ID]).FUN_PIC
)
)

Or

ClearCollect(
            arretequp,
            AddColumns(
                       RenameColumns('[dbo].[DOWN_TIME]', "FUN_ID", "FUNC_ID"),   /* <-- Use your RenameColumns() function here , rather than with your '[dbo].[vFunctionCodeFilteredByMobileEquipment]' table */
                       "daysdown", Round(Today()-DATE_STOP,0),
                       "funcode", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID= FUNC_ID).FUN_CODE,
                       "fundesc", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID= FUNC_ID).FUN_DESCR,
                       "funpic", LookUp('[dbo].[vFunctionCodeFilteredByMobileEquipment]',FUN_ID = FUNC_ID).FUN_PIC
           )
)

Please take a try with above formula, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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 (4,709)