web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ClearCollect Gallery.A...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 62

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?

 

Annotation 2020-07-15 175248.png
Annotation 2020-07-15 175018.png
Annotation 2020-07-15 174939.png
Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    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

  • Christoph15 Profile Picture
    62 on at

    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

     

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    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

     

  • Christoph15 Profile Picture
    62 on at

    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 Profile Picture
    62 on at

    Christoph15_0-1595021763929.png

    Christoph15_0-1595055200289.png

     

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

     

  • ddeborja Profile Picture
    5 on at

    Im having this exact same issue

  • Christoph15 Profile Picture
    62 on at

    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".

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard