You can use a gallery, set your desired filters or just connect to your data source, add text label where label would be as "ThisItem.StudentName" replacing StudentName of the actual column where your student name is set. Add a button to this gallery, now you should have a button next to each student name.
Change the buttons OnSelect option to some kind of trigger action. If you have a column in your datasource called Status or something, then buttons OnSelect would be.
UpdateIf(DataSource,ID = ThisItem.ID,{Status:{Value:"Present"}})
then use gallery option = TemplateFill, there you can play around and use something like =
If(ThisItem.Status="Present",RGBA(0, 0, 0, 0),RGBA(99, 99, 0, 0))
to count students present use text label with formula:
CountRows(Filter(Gallery.AllItems,Status="Present"))
_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!