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 / Patching into a galler...
Power Apps
Unanswered

Patching into a gallery using ThisItem

(0) ShareShare
ReportReport
Posted on by 1,207

I'm building a simple questionnaire. The questions are populated from a SharePoint list.

 

I make the following collection which I want to use to collect the responses and eventually patch to a different SharePoint list that stores completed questionnaires.

 

ClearCollect(
 colQuestionnaire,
 AddColumns(
 ShowColumns(
 'SharePointQuestions',
 "QuestionNumber",
 "QuestionText"
 ),
 "Answer",
 false
 )
)

 

colQuestionnaire is used in my gallery items 

 

I've used a flexible height gallery contains a label for the question text and a toggle button.

 

I thought I could use the following formula in the OnCheck/OnUncheck

 

Patch(colQuestionnaire,ThisItem,{'Answer': true }) // OnCheck

Patch(colQuestionnaire,ThisItem,{'Answer': false}) // OnUncheck

 

The problem I'm getting is I need to click twice in order to get the radio to change.

 

I'd be grateful for help getting this working.

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at

    Hi @Digital ,
    There is nothing wrong with your logic - your collection is three columns from SharePointQuestions with a Boolean addition Answer as false. You have mentioned a toggle button - I assume you mean a checkbox?

    I use almost exactly the same methodology (checkbox) in a collection-based gallery I have for crew selection for jobs and just checked and they select first time. Please confirm this is a checkbox.

     

     

  • Digital Profile Picture
    1,207 on at

    hi @WarrenBelz ,


    I was using a the toggle control but have switched to a checkbox. The buggy behaviour may have been due to preview mode not rendering the flexible gallery. Clicking a control in one gallery row was changing controls in other rows. 

    It’s behaving much better in play mode, although still not perfect. Whenever I use flexible height galleries they always seem a bit glitchy but that’s another issue. 

  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at

    Thanks @Digital ,

    It must be a bug as your code should do exactly as you intend on the checkbox. I do not use this type of gallery much and have never done so in an editable item, so cannot relate much as far as experience in what you are doing.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 364 Most Valuable Professional

#2
11manish Profile Picture

11manish 186

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 105 Super User 2026 Season 1

Last 30 days Overall leaderboard