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

Updating Gallery

Hey folks,

 

I have a gallery with many items in for which each item has a slider control. The default value of the slider control is set to a value within the underlying table.

 

e.g.

 

ID | Name | Value

 

When I load the items into the gallery I can change the slider to be a differnt value and then submit the new value for that item. However when changing the value for other items in the gallery the gallery refreshes and sets the slider back to the default value.

 

This is the formula used to set the items within the gallery. As you can see it pulls a record based on another gallery.

Filter(ref_consultantskills, StartsWith(email, Gallery3.Selected.Email))

This is the formula to configure the default value of the slider.

ThisItem.skilllevel
6 REPLIES 6
Highlighted
Helper I
Helper I

Re: Updating Gallery

As a note...

 

When I change the slider regardless of the formula used all other items within the gallery refresh.

Highlighted
Microsoft
Microsoft

Re: Updating Gallery

Hello,

 

Can you please provide more details on this:

"However when changing the value for other items in the gallery the gallery refreshes and sets the slider back to the default value"

 

For example, if I add another control besides the slider to the gallery and change its value then the Gallery does not refresh and the slider control keeps its value. Is it possible that you reset all the Gallery values, including the default value for the slider? If so then the slider would disregard the previously set values.

Highlighted
Helper I
Helper I

Re: Updating Gallery

Hi @dinusc

 

Lemme add some images.

 

Here is what I see when the items are loaded into the gallery:1.PNG

 

 

When I change the value on the first "item" it can be submitted to the underlying SharePoint list. However when I select a slider on another card the whole gallery resets to the value in the underlying data.

 

E.g.

 

  1. Set the first item value to 5
  2. Save the value
  3. Select another item and change the value to 5
  4. Gallery resets
  5. Maintaining the initial value of 5 in the first selection.

Hopefully that makes more sense

Thanks,

J

 

Highlighted
Microsoft
Microsoft

Re: Updating Gallery

I'm sorry but I still don't understand what happens. You say that when you change the value of the second slider, after changing the first slider, then the "gallery resets" but the first slider keeps its value. Can you please clarify what do you mean by "gallery resets"?

Also, do you have any formulas assigned to your Gallery.OnChange property? If so then can you reproduce the issue after removing those formulas?

Highlighted
Helper I
Helper I

Re: Updating Gallery

It might be me not explaining it properly.

 

I have a gallery, each gallery item contains a slider. The lable displaying the numeric value is linked to the slicer. When submitting a record the label value is saved to a SharePoint list for each item in the gallery:

 

ForAll(
    Gallery4.AllItems,
    Patch( ref_consultantskills, {ID:ID},
    {
        skilllevel : Label1_5
    }
))

When I pick a value using the slider the label changes to that value. This step is only valid for the first item in the gallery. The card being the one modified within the Studio designer.

 

Each item within the gallery is loaded using the following:

Filter(ref_consultantskills, StartsWith(email, Gallery3.Selected.Email))

Here you can see that an item is selected in a seperate gallery. This is used to show related items.

 

When I change the value of a slider other than the first slider, the gallery "flickers" resetting all sliders for each item to it's default value. E.g. if I set a slider to a value of 5, it would reset back to 0. This also effects the first item resetting this value to the default value.

 

The formula for the default value is here:

ThisItem.skilllevel
Highlighted
Microsoft
Microsoft

Re: Updating Gallery

Thanhk you for providing detailed information, but I could not reproduce this issue.

Can you try to reproduce this with a simple app bound to an Excel table? If so then sharing the test msapp file and the Excel file would be a huge help. Thanks.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

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 (2,901)