Wondering if this is possible... I'm buildin...

expressions
(Preston Moore) #1

Wondering if this is possible…

I’m building an attendance app for our school. There are 3 options - Present, Absent, and Tardy. I’m using a ValidIF expression to select the students based on the grade and college (homeroom) selected.

So a teacher selects the grade then the college, and based on those selections they are presented with the class roster. They select the students that are Present first and the form advances to the next list for Absent students.

My question is can I limit the Absent list options to only include the students who were not marked Present?

Pic 1 - students who are Present are selected Pic 2 - only students who were not selected in Pic 1 appear in Absent list

[EDIT] - not that it matters for my question, but it makes more sense for the teacher to select the kids who are Absent then Tardy, leaving the kids who are Present since there will be more of them.

(Preston Moore) #2

Form steps…

(Preston Moore) #3

@Suvrutt_Gurjar THANK YOU SO MUCH!! Couple small tweaks and it’s perfect!

(Suvrutt Gurjar) #4

Hi @ktv, good to know it works for you. Thank you for the update.

(Suvrutt Gurjar) #5

Hi @ktv for your description and images shared ,it appears that you have a look up table of Grade, College and Student Names from where you are filling up the form fields using Valid_if criteria.

Also I presume you are using Enumlist fields for Present,Absent and Tardy.

If this understanding is correct,please try the following

  1. In the [Absent] Enumlist field in the form, please enter the expression in the Valid_if field as follows Students[Name] where Students is the look up table containing Grade,College and Student Names data and [Name] is the student name column.

  2. In the [Tardy] Enumlist field in the form, please enter the expression in the Valid_if field as follows =SELECT(Students[Name],AND([Grade]=[_THISROW].[Grade],[College]=[_THISROW].[College])) - [Absent]

  3. In the [Present] Enumlist field in the form, please enter the expression in the Valid_if field as follows-

=SELECT(Students[Name],AND([Grade]=[_THISROW].[Grade],[College]=[_THISROW].[College])) - [Absent] -[Tardy]

Please also enter this expression in the initial value of the [Present] field.

The above configuration will also help you in your requirement that once [Tardy] students list is selected by the teacher, those names will not appear in [Absent] list and finally once [Absent] students are selected, they as wella s [Tardy] students will not appear in [Present] list.

In short remaining [Present] list can be simply selected all by the teacher. This list will anyway be selected through initial value.

I have tested this. Hope this helps.