cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jp206
Frequent Visitor

Updating offline data collection from input provided within a gallery

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

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-monli-msft
Community Support
Community Support

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

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

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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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