cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Christoph15
Helper I
Helper I

ClearCollect Gallery.AllItems doesn't 'save' correct values

Hi everyone,

 

I'm facing an issue with collection all gallery items into a local collection which I don't understand.

 

  • I have a empty collection which gets collected at the start up from a SharePoint list to reflect the same columns
  • This empty collection is my item property of the Gallery
  • Just for testing I have added 3 controls inside my Gallery
    • Dropdown - Product Name (long list of strings)
    • Label - Product Description which gets looked upped
    • Textinput - Just for testing
  • I have added a save icon to Clear collect my Gallery into a new local collection (to check the stored values)
    • ClearCollect(test,Gallery1.AllItems)

 

I hope I have mentioned everything important 🙂 

The issue is that when I select a product from the dropdown (the look up in the label for the description is working as expected) and enter something in the textinput field, non of the selected values are stored correctly in my local test collection. 

e.g. for the dropdown the selected property is empty and selected text does show a wrong (different from what I have selected in my dropdown 85550 vs. 72400023 ) value.

 

What am I missing here?

 

7 REPLIES 7
v-bofeng-msft
Community Support
Community Support

Hi @Christoph15 :

About the value of selected is empty.

I encounted the same problem.But after my test, it is not really empty, just looks empty. I can still quote its value.

1\Add a gallery

2\Add a dropdown control(Dropdown1) into this gallery

items:

 

[1,2,3,4]

 

3\Add a button 

OnSelect

 

ClearCollect(wasd,Gallery4.AllItems.Dropdown1)

 

4\Add a label(call the value of selected)

Text

 

First(wasd).Dropdown1.Selected.Value

 

t22.gif

About selected text does show a wrong value.

I did not encount this problem.Could you specifically describe how the dropdown control is set up?

Best Regards,

Bof

Thank you already for your reply. 

 

This is how the dropdown is set up.

 

Christoph15_0-1594884946908.png

Christoph15_1-1594885004187.pngChristoph15_2-1594885068579.png

 

 

Hi @Christoph15 :

This is too weird, I have tested it many times and failed to reproduce the situation you mentioned.

Could you tell me what is 'Product Code''s data type?

I suggest that you check the problem from several aspects:

1\Add two labers into this gallery and set it's Text property to "Dropdown9.SelectedText.Value" and "Dropdown9.Selected.Product Code"

Check if the results is as expected

2\Check the value of  'Product Code and Description'.'Product Code'.

Add a button and set it's OnSelect property to 'ClearCollect(varcollection,'Product Code and Description'.'Product Code')'

Check  the collection  varcollection.(Could you share the screenshoot to me)

3\Check the value propery for the dropdown control

1.JPG

Best Regards,

Bof

 

I think I found the root cause but no idea how to work around it.

 

If I add the save (clear collect) button inside the gallery item it saves the correct values.

If the button is outside that gallery somewhere else, I can replicate the saving issue.

 

Christoph15_1-1594906644502.png

 

 

Christoph15_0-1595021763929.png

Christoph15_0-1595055200289.png

 

It's a nested gallery inside a data card of a SharePoint form

 

Im having this exact same issue

not sure if this is an intended behavior of a nested gallery but it looks like we need to find another way to work around this "limitation".

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,245)