cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Smilee279
Resolver I
Resolver I

Issue pulling checkbox data from sharepoint list into gallery that's in a datacard

Hey all,

 

I'm building a checklist app for a team that after they submit their answers to the checklist that they want to be able to go back and edit/update the same list.  I've set this up within 2 screens, one is a "list view" that shows the SP List line items, and the actual checklist screen which is a form with embedded galleries for the checkboxes.  (Each datacard has a nested gallery for the checkboxes).  

 

The checklist screen is currently being used as a view/edit/new form.  

 

The initial save (submit form) works great, and all the data is saved to the SPList.  However, when I go back to the Browse Screen, select the record I want to pull up (all one sharepoint line item) it doesn't display the data from the checkbox columns.  All other datacards are pulling the data properly. 

 

Browse Screen:

Smilee279_0-1634761412207.png

The Browse list is a gallery with the:

OnSelect EditForm(ChecklistForm);Navigate('Checklist Screen') 

Items is a search in the MRN field :  Search(colRecords,txtSearch_1.Text,"MRN")

 

When I click the entry, it *does* pull up the record (colRecords is collecting MRN, Patient Name, Last Updated, Author, Editor, and ID)

 

Checklist Screen:

Smilee279_2-1634762037837.png

The data from MRN, Patient Name, Created, etc, are pulling the data into the form from the SPList.  The individual checkboxes (each color is its own gallery nested in a datacard) are not.  I'm pretty sure that's why--but I don't know how to fix it so that the ViewForm or EditForm populates the data from the SPList.  

 

 

 

 

19 REPLIES 19
RandyHayes
Super User
Super User

@Smilee279 

What is the Default property of the Checkbox in the Gallery?  It needs to work off of the record data that is stored.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Smilee279
Resolver I
Resolver I

@RandyHayes 

So that was the first thing I started tinkering with based on your suggestion on this post:
https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-display-a-checked-Checkbox-in-FormMod...

Currently there's nothing in the default property.  Since it's a checkbox in a gallery that's in a datacard that's in a form--I don't even know WHAT to put for the default property since the parent of the checkbox is the gallery, which isn't going to pull anything, and I tried and ThisItem.Value gives me a delegation warning that the value is looking for a true/false statement.  

RandyHayes
Super User
Super User

@Smilee279 

Well, then the real question would be this - What kind of column is the underlying column in the record?  

What also is the Update property of your datacard?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Smilee279
Resolver I
Resolver I

Column is a choice column.  The nested gallery Items property is  Choices(SPList.Column), and OnSelect is Collect(colSepsis, ThisItem.Value)

 

Update for the Datacard is colSepsis.

 

RandyHayes
Super User
Super User

@Smilee279 

Change your Default property in the Gallery to: 

    Self.Value in ThisItem.yourChoiceColumnName.Value

 

Normally you would reference the Parent.Default of the datacard, but since this is in the Gallery, the Parent will be different.  So, just specify the ThisItem.yourChoiceColumnName (replace as needed).

 

HOWEVER...you will Also need to deal with your collections again when you edit.  The reason is, if you don't repopulate the collection, then when you submit that form again, it is going to update the column with the contents of the collection...and if you don't recollect it, it will be empty and your record will be blank for that column.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks, I'm going to try this shortly!  I have a Clear(colSepis) set on the submit button, but after the SubmitForm, so I should be good, right?  I'll report back on the default property.  

 

Thank you for your help so far!

Smilee279
Resolver I
Resolver I

@RandyHayes 

I tried your suggestion, and keep getting this error.  When I put Self.Value in ThisItem.SEPSIS.Value in the Default property, it throws an error saying that this functionality is only available in the Items property.  I then tried that, and got an error that.  

 

SO, I tried putting ThisItem.SEPSIS.Value in the Default property of the Gallery, and got the below error:

Smilee279_0-1634822860914.png

 

RandyHayes
Super User
Super User

@Smilee279 

Which control Default property are you putting my formula suggestion in??  It should be in the Default property of the Checkbox control in your Gallery.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Smilee279
Resolver I
Resolver I

I initially put it as the default value to the Gallery since that's what you said in the post.  

 

SO, in putting ThisItem.Value (my only option other than ThisItem.IsSelected) for the default property of the checkbox, and I get a delegation warning:

Smilee279_0-1634827845153.png

 

I tried the Self.Value in ThisItem.Value (ThisItem.SEPSIS.Value is not an option), and got a circular warning:

Smilee279_1-1634828020507.png

 

To be clear--this is in the default property of the checkbox.

Smilee279_2-1634828070133.png

Smilee279_3-1634828114678.png

 

 

 

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