cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Danilo-ES-BR
Helper I
Helper I

How to include image in combobox

Hi All,

I need to add images inside my combobox that are inside a library in the sharepoint, as shown in the image below it is possible to add an image field and it even recognizes the image field, however when selecting the field it does not fix. I also tried using the document library URL in a sharepoint list, and the same thing happens, it recognizes the field but does not keep the selected field. It is possible to do what I need or this field only enables people in the office365 connector.

Follow the example in the images below.
Ty
document combobox.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Danilo-ES-BR :

Do you want to display pictures from SP library in a combo box control?

I am afraid this is difficult to do because:

  • powerapps can only get metadata from SP library (not including file content).
  • Although the image control supports the use of the '{Link}' field to display images in the SP library, this method is not supported in the Persib layout mode of Combox.

Therefore, my alternative is to use costom components:

0\Add a button and set it's OnSelelct property to

 

ClearCollect(YourSPlibrary,picc) /*test is my custom collection*/

 

Because connection cannot be called directly when creating a component, I temporarily create a collection to create this component

1\Add a New Component(Component2)

2\Add a New custom property-Items

1.JPG

set the component's items propety to

 

test

 

5.JPG

3\Add a New custom property-Selected

2.JPG

4\Add a textinput control-TextInput8

Default(Clear the default property)

 

 

5\Add "down" arrow 

OnSelect

 

Set(MYVar,!MYVar) /*MYVar is my custom variable*/

 

6\Add a gallery(Gallery18)

Items 

 

If(IsBlank(TextInput8.Text),Parent.Items,Search(Parent.Items,TextInput8.Text,"{FilenameWithExtension}"))

 

Visible

 

MYVar

 

Set the image control's(Which in the gallery) Image property to

 

ThisItem.'{Link}'

 

6.JPG

7\Set the Component's Selected property to

 

Gallery18.Selected

 

7.JPG

8\Add this component on your screen and set it's items property to

 

YourSPLibrary

 

52.gif

Best Regards,

Bof

 

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @Danilo-ES-BR :

Do you want to display pictures from SP library in a combo box control?

I am afraid this is difficult to do because:

  • powerapps can only get metadata from SP library (not including file content).
  • Although the image control supports the use of the '{Link}' field to display images in the SP library, this method is not supported in the Persib layout mode of Combox.

Therefore, my alternative is to use costom components:

0\Add a button and set it's OnSelelct property to

 

ClearCollect(YourSPlibrary,picc) /*test is my custom collection*/

 

Because connection cannot be called directly when creating a component, I temporarily create a collection to create this component

1\Add a New Component(Component2)

2\Add a New custom property-Items

1.JPG

set the component's items propety to

 

test

 

5.JPG

3\Add a New custom property-Selected

2.JPG

4\Add a textinput control-TextInput8

Default(Clear the default property)

 

 

5\Add "down" arrow 

OnSelect

 

Set(MYVar,!MYVar) /*MYVar is my custom variable*/

 

6\Add a gallery(Gallery18)

Items 

 

If(IsBlank(TextInput8.Text),Parent.Items,Search(Parent.Items,TextInput8.Text,"{FilenameWithExtension}"))

 

Visible

 

MYVar

 

Set the image control's(Which in the gallery) Image property to

 

ThisItem.'{Link}'

 

6.JPG

7\Set the Component's Selected property to

 

Gallery18.Selected

 

7.JPG

8\Add this component on your screen and set it's items property to

 

YourSPLibrary

 

52.gif

Best Regards,

Bof

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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