cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
venka91
Super User
Super User

ForAll Gallery Items to new Sharepoint list

Hi there,

For a student attendance app, i am loading the students details from a share point list using gallery. Basically all the student will be by default made present for all the 4 checkpoints. In case any of the student is absent for any checkpoint, only it will be unchecked.

All these records including students who checked and unchecked, i would like to store them in a new share point list.

I read some blogs and video, but not able to achieve what i am looking for. Could any one please help me.

 

venka91_0-1637994897767.png

 

All the student details comes from the master share point list. Class teacher have an option to uncheck the timeslots if the student is absent. So now my goals is to store the record that is edited and record that is not edited. Basically all the gallery items would need to move to the new sharepoint list.

 

Please help.

 

12 REPLIES 12
venka91
Super User
Super User

Posting better image.

Screenshot from 2021-11-27 12-28-48.png

Hi @venka91 ,'

Assuming your field '5:30 AM' is a Yes/No field in the list SAL_DAILY, try this

ForAll(
   Galleryl.Allltems As aPatch, 
   Patch(
      SAL_DAILY,
      {ID:aPatch.ID}, 
      {'5:30AM':aPatch.Checkboxl.Value}
   )
)

 

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.

Visit my blog Practical Power Apps

 

Thank you. this is worked. But i have come across one more challenge. Since i am storing the gallery result items to new share point list, when i want to reload the data in gallery , i want to display these time slot values from the new share point where my gallery results are stored.

 

Is this possible ?

Example, on the below image, my time slot values should be showing the values that are stored in the record from gallery results share point list.

 

i had a bit idea, i will store the gallery result share point list into collection. and then display values to time slot from the collection.

But i don't know how do i pull each record and its corresponding values from collection so, the checkbox shows the values.

Screenshot from 2021-11-27 14-59-50.png

Hi @venka91 ,

What are the current Items of the gallery?

It is coming from my master student data share point list. All our Students data we are maintaining in master_data sharepoint list. I added 6 checkboxes for attendance time slot and as i said before, saving these values into a new share point list called stu_daily.

 

Class monitor, logs into application on time slot intervals, and check / uncheck values and submit the results. So i wanted to show the checkbox values from my stu_daily share point list,.

 

Also since i am using patch without any condition, i do not know how do i avoid duplicate record, when the class monitor submit the record again and again for each time slot.

Hi @venka91 ,

Can you please post the Items property of the gallery in Text.

venka91
Super User
Super User

Filter as follows :

Set(varcampus, ddcampus.Selected.Value); Set(varClass,ddclass.Selected.Value);

venka91_0-1638011667072.png

And in gallery Item Property:

Filter(SAL, campus.Value = varcampus && class.Value = varClass)

 

SAL is my master_student data share point list.

 

Hi @venka91 ,

You are patching to SAL_DAILY, but your gallery is filtered on SAL (so it will not show any updates). You need to also Patch to SAL if you want the updates to be displayed. Are these both lists or is one a collection? Also you are patching to update a specific record, so will not have duplicates (or are these new records)?

 

venka91
Super User
Super User

SAL and SAL_DAILY are lists. 

SAL_DAILY will have new records as the attendance needs to be captured everyday.

 

This is where I am confused how do I make new records and also display the values for existing records.

 

SAL is used only to pull the list of students from list. So I can generate atteandance and save them as new records in another list as I need the data for everyday. 

 

No idea I have got so far in what other way I can do it. Pls guide me if you have new ideas on doing this and pls assist me.

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,580)