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

Add Conditional image in a table

Hi everyone

I'd like to know if there is a way to add an image in my table depending of a value inside it

For example imagine, I have a table with the value cost which equals to expensive, so in this case, I'd like to add a image(for example sad smiley) in my table where the value expensive is associated to the line

Is there a way to do that?

And have you some advance tutorial for powerapps? Because I followed the tuto on EDX but it's only the basis of powerapps

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Add Conditional image in a table

Yes, that's correct. The data table control doesn't support images.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/controls/control-data-table

In a gallery control, you can use the insert menu to add additional fields. The way to this is to select the first item in the gallery control from the designer. The first item acts as a template for all the rows that appear in the gallery. From here, you can add an image control and set the Image property to ThisItem.CostImage.

View solution in original post

4 REPLIES 4
Highlighted
Anonymous
Not applicable

Re: Add Conditional image in a table

You can use the Visible attribute of the image like that : ValueExpenssive>X .

Highlighted
Super User III
Super User III

Re: Add Conditional image in a table

Hi @freedumz

 

One way to do this is to first upload two image files via the File > Media menu. The first image would be your sad smiley icon, and the second would be an empty placeholder image. Let's assume that these images are called SadSmiley and BlankImage.

If you now add a gallery control to your screen, go to the advanced group in the properties pane and set the items property to:

AddColumns(YourDataSource, 
           "CostImage", 
           If(Cost = "Expensive", SadSmiley, BlankImage)
)


Once you do this, you can display the "CostImage" field from within your gallery control.

Hope that helps.

Highlighted
Helper II
Helper II

Re: Add Conditional image in a table

Thanks for your quickanswer

When I do that, I have the path of my image which appears and not the image 😕

But it's working I have blank or expensive which appears depending of the case

So apparently, it's not possible to add image in Data table? so is there a way to increase the number of showing elements in a gallery?

 

Highlighted
Super User III
Super User III

Re: Add Conditional image in a table

Yes, that's correct. The data table control doesn't support images.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/controls/control-data-table

In a gallery control, you can use the insert menu to add additional fields. The way to this is to select the first item in the gallery control from the designer. The first item acts as a template for all the rows that appear in the gallery. From here, you can add an image control and set the Image property to ThisItem.CostImage.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,324)