Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Updating offline data collection from input provided within a gallery

(0) ShareShare
ReportReport
Posted on by

Hi, please help!

 

I have been struggling to build an app with a list of audit questions (changeable, and currently stored in an independent sharepoint list) that can be loaded in as a collection for offline use. Users need to be able to scroll through the questions, assign a score out of 5 to each question and make some comments.

 

Currently, I have a gallery which displays each question, and each has its own dropdown to select a number, and a textinput for the comments.

 

I have been trying to use:

 

Button (outside of gallery) OnSelect:

 

ForAll(GALLERYNAME.AllItems, UpdateIf(LOCALCOLLECTION,IsBlank(Score),{Score: DROPDOWN.Selected.Value, Comments: TEXTINPUT.Text}))

 

but when i hit the button, every item in the collection is given the same score and comment.

 

Using UpdateIf as Patch was not working at all for this purpose.

 

Any help to make this work properly will be very gratefully received!

 

Thanks

  • jp206 Profile Picture
    on at
    Re: Updating offline data collection from input provided within a gallery

    Hi,

     

    Score is a column in the Sharepoint List. It's where the score for the audit is stored. The field is blank until the question is answered. Score is determined by selecting a number from a Dropdown Box.

     

    Thank you

  • v-monli-msft Profile Picture
    on at
    Re: Updating offline data collection from input provided within a gallery

    Hi @jp206 ,

     

    What is "Score" referring to? Is it a variable that you created or a control's name? Please share the related details and formulas.

     

    Regards,

    Mona

  • Verified answer
    Pstork1 Profile Picture
    66,015 Most Valuable Professional on at
    Re: Updating offline data collection from input provided within a gallery

    Take a look at your UpdateIf().  Basically it says for every item in the Local Collection where Score is Blank, set it equal to the selected value of the dropdown.  There is nothing that specifies which record should be updated, so all of them are updated.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard