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

Image Gallery Help

I have an image gallery adding to a custom form. I would like to be able to select the title of the image then populate the title information to a multiselect field. 

 

Any help would be appreciated. 

5 REPLIES 5
Microsoft v-siky-msft
Microsoft

Re: Image Gallery Help

@mperez84 

What is the data type of the multiselect field? Could you share the Items proeprty of combo box?

Do you mean you want to fill that field through selecting the gallery?

If the multiselect field is a LookUp field, and the field is a lookup to the Title of image gallery data source, please try this:

1. Set OnSelect property of Gallery: 

 

Collect(MyCol, {Id:Gallery.Selected.ID})

 

2. Set DefaultSelectedItems property of Combo box:

 

Filter(Choices('SP list'.FIeldName),Id in MyCol.Id)

 

or 

 

If(IsEmpty(MyCol), Parent.Default, Filter(Choices('SP list'.FIeldName),Id in MyCol.Id))// to show the default selections

 

3. Set OnChange property of combobox:

 

ClearCollect(MyCol,DataCardValue1.SelectedItems.Id)

 

StoG_28.gif

Sik

 

mperez84
Level: Powered On

Re: Image Gallery Help

@v-siky-msft Thanks for the response!

 

I'm new the powerapps game, so I'm sorry if i'm vague with my response.

 

The combo box Items property is set to the sharepoint image gallery and yes that's exactly what I'm trying to do is fill the field when selecting one or multiple items from the gallery but the only info from the gallery I need is the title information.

 

Thanks

 

Microsoft v-siky-msft
Microsoft

Re: Image Gallery Help

@mperez84 

 

Could you share the data construct of custom form? 

I need to know what is the data type of combobox field. Does it a Lookup field?

Sik

 

mperez84
Level: Powered On

Re: Image Gallery Help

@v-siky-msft 

 

The combo box field is a lookup field to the gallery datasource. 

 

The construct to the custom form is 2 datasources/2 list. List A is where I would like the data to be stored, List B is set as a gallery that I would like to select, on selection show selected back to the combobox field. When save/submitted write the data back list A. 

 

 

Highlighted
mperez84
Level: Powered On

Re: Image Gallery Help

@v-siky-msft  

 

So I was able to achieve show the gallery selection using this formula below:

 

Patch('SP List b', gallery.selected, {'column name':ComboBox1.SelectedItems}) then setting the combobox1 "defaultselecteditems" properties to gallery.selected.columnname and "Items" to choices('sp list b'.columnname)

 

I'm not sure why using  "selecteditems" control isn't reflecting multiple selections in the combobox, The column field of list b is set to  multiple choices.

 

 My next question is how can I take what's being patched from list b when a user submits the new form using the default save update the on list A and not modify list b?

 

Thanks Again 

 

 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,791)