Hi,
I need to submit multiple names to SharePoint List for attendance checklist. But the problem is, if I tick 4 checkbox only 1 latest one that were selected that will submit to the SharePoint list.
I have 2 button which are Presence and Absence.
below is my SP List for the attendance checklist:
Here's my OnSelect for Presence button.
ForAll(colAttendees, Patch('SEMINDA Student Attendance Checklist', Defaults('SEMINDA Student Attendance Checklist'), {'Student Name': ThisRecord.'Display name', 'Class Name': ThisRecord.'Class Name'}))
Additionally, is there anyone know how to make the title the same function as ID? I didn't want the "true" result. I want it to be every time the SharePoint list has new item, title will +1 or have the long ID can too.
Please help me if anyone knows how.
Thank you.
Hi,
Thank you, the code you give to me is right.
The only problem why it runs but no data submitted in the SharePoint list is because my Title column is set as required in the SharePoint list.
And, I have accept your answer as solution.
Thank you. Both of you, @WarrenBelz @Aapok
Based on the posts in this thread, it looks like you're missing a ; after the patch function. I'm assuming the code to run the flow comes after your patch (like in your examples), and the missing ; is causing the error with @WarrenBelz 's code.
The code I posted is valid if your references are also valid, so please check them. I cannot help you unless I know the error it is producing.
Hi,
1. This code that you provided to me is the error. The whole code.
2. For the title resulting true value is the one I use PowerApps button flow.. resulting the true value. (Before I changed it with your code, this is the code I used for OnSelect)
ForAll(colAttendees, Patch('SEMINDA Student Attendance Checklist', Defaults('SEMINDA Student Attendance Checklist'), {'Student Name': ThisRecord.'Display name', 'Class Name': ThisRecord.'Class Name'})); PowerAppsAbsencebtn.Run(Checkbox2_5.Value, Label6_5, Label8); Collect(CombinedListsCollection, Checkbox2_5.Value); Set(NotifyVisible, true); Set(ResetCheckbox, true)
This is the one for 2nd question I asked in my post. The full code I input in my OnSelect. The one that I put in the post is only within the first ; .
Hope it helps. Sorry for the misunderstand. Thank you.
That is not even close to what I posted. What is the error with the code I supplied ?
Hi,
So for error is the whole code that you replied to me.
And for the Title question, it is not through your code that it got "true" result. It's just before I use your code, I use PowerApps button flow to update the Presence/Absence status. I just called for the PowerApps button value, the display name (student name) and class name in the flow. So I guess that's why my Title result is true. So I want to know if anyone know how to change it to other than true result.
Here's my full code for the OnSelect;
ForAll(colAttendees, Patch('SEMINDA Student Attendance Checklist', Defaults('SEMINDA Student Attendance Checklist'), {'Student Name': ThisRecord.'Display name', 'Class Name': ThisRecord.'Class Name'})); PowerAppsAbsencebtn.Run(Checkbox2_5.Value, Label6_5, Label8); Collect(CombinedListsCollection, Checkbox2_5.Value); Set(NotifyVisible, true); Set(ResetCheckbox, true)
Hope it answer your confusion. Thank you.
I was following your values posted assuming them to be valid. The syntax structure is valid if your values are. What is the error ? You have still lost me on the Title question - how does true get posted in there - it is not in the code you posted.
Hi,
I've already try but it's an error. All are lined for the error.
And for the question 2, I'd edited my post, where I inform the picture is my sp attendance checklist, and as you can see the title automatically submit as "true" instead of number.
Thank you.
Hi @NurSabrina24 ,
Firstly try this
Patch(
'SEMINDA Student Attendance Checklist',
ForAll(
colAttendees As aPatch,
{
'Student Name': aPatch.'Display name',
'Class Name': aPatch.'Class Name'
}
)
)
I am not sure what you mean by the second question. The ID will increment by 1 with each new record. Title is a Text column.
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