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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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,708)