cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gareth1
Resolver IV
Resolver IV

Nested gallery item not maintaining fill

I'm working with a nested gallery inside another gallery with a list of questions and a label for the response and I'm having some trouble with setting the fill of the selected item

 

If I use the following on the Label I sometimes have to click twice before it recognises that the item is selected

 

If(ThisItem.IsSelected, btnStyle.DisabledFill, btnStyle.Fill)

 

 

I think this is related to the OnSelect function of the nested gallery item where I am patching the collection used by the parent gallery based on the response selected

 

Patch(
    CollectQuestions,
    LookUp(
        CollectQuestions,
        ID = checklistQuestionList.Selected.ID
    ),
    {Response: ThisItem.Response}
);

 

I can see that the value is updating but the fill value doesn't update it until it is selected the second time

 

I'm relatively new to PowerApps but would appreciate any help or pointing in the right direction

 

ThanksFirst PressFirst PressSecond PressSecond Press

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Gareth1 ,

I agree with @WarrenBelz .

Your settings about your gallery has no problem.

The key point should be the selecting position.

If you want to select one item of the nested gallery, you should click inside the nested gallery.

If you click outside the nested gallery, inside the outside gallery, it will not reflect one selected item in nested gallery.

1)click inside the nested gallery:

615.gif

 

2)click outside the nested gallery:

6151.gif

 

 

What's more, if you think your data does not fresh immediately after you update data source, you could add a refresh function after the patch function.

Please notice that fresh function only works for data source, not work for collection.

Just like this:

Patch(
    CollectQuestions,
    LookUp(
        CollectQuestions,
        ID = checklistQuestionList.Selected.ID
    ),
    {Response: ThisItem.Response}
);
Refresh(CollectQuestions)

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @Gareth1 ,

The  setting you have Is the only one that will set the TemplateFill of any gallery selected item, primary or nested. What I believe is happening is that the first click is selecting the primary gallery, then the next one the nested item. There is nothing else you can set on this.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

v-yutliu-msft
Community Support
Community Support

Hi @Gareth1 ,

I agree with @WarrenBelz .

Your settings about your gallery has no problem.

The key point should be the selecting position.

If you want to select one item of the nested gallery, you should click inside the nested gallery.

If you click outside the nested gallery, inside the outside gallery, it will not reflect one selected item in nested gallery.

1)click inside the nested gallery:

615.gif

 

2)click outside the nested gallery:

6151.gif

 

 

What's more, if you think your data does not fresh immediately after you update data source, you could add a refresh function after the patch function.

Please notice that fresh function only works for data source, not work for collection.

Just like this:

Patch(
    CollectQuestions,
    LookUp(
        CollectQuestions,
        ID = checklistQuestionList.Selected.ID
    ),
    {Response: ThisItem.Response}
);
Refresh(CollectQuestions)

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @WarrenBelz 

Thanks for the response. 

With both responses I was able to get a better understanding of why the issue was occurring

Hi @v-yutliu-msft 

Thanks for the explanation. Gave me a better understanding of how it works

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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