Below is my scenario:
I have 2 tables Course and Enrollment.
Course table contains Course name, number of activities, assessment method(total 10 text fields) and course description.
Enrollment contains 2 Pass or fail field (dropdown) and a date field for one assessment method field.
So for every Assessment method field there are 2 passfail and date fields. (total 20)
Enrollment and course are connected in such a way that many enrollments belong to one course.
I need to show or hide these pass fail and date fields based on number of activities field in course. When a course name is selected from a drop down, number of activities is also displayed as a lookup field.
Example: for number of activities =3
show Assesment method 1 , 2 and 3
show pass fail 1 ,2,3,4,5 and 6
show date 1 ,2,3,4,5 and 6
hide assessment method 4 to 10
hide pass fail 7 to 20
hide date 7 to 20.
Can anyone please help to resolve this?
I have 2 tables Course and Enrollment.
Course table contains Course name, number of activities, assessment method(total 10 text fields) and course description.
Enrollment contains 2 Pass or fail field (dropdown) and a date field for one assessment method field.
So for every Assessment method field there are 2 passfail and date fields. (total 20)
Enrollment and course are connected in such a way that many enrollments belong to one course.
I need to show or hide these pass fail and date fields based on number of activities field in course. When a course name is selected from a drop down, number of activities is also displayed as a lookup field.
Example: for number of activities =3
show Assesment method 1 , 2 and 3
show pass fail 1 ,2,3,4,5 and 6
show date 1 ,2,3,4,5 and 6
hide assessment method 4 to 10
hide pass fail 7 to 20
hide date 7 to 20.
Can anyone please help to resolve this?
 1,550 Points
Posted 2 months ago
QuickBaseCoach App Dev./Training (Mark Shnier), Champion
 72,438 Points
This sounds like you want to use Dynamic Form Rules. You will make a separate Dynamic Form rule for every field or every set of fields (or sections(s)) which are to behave identically.
ie you need to look at any given field and make a single rule to either show or hide that field.
ie you need to look at any given field and make a single rule to either show or hide that field.
 1,338 Points
Is there a reason you are wanting to use JavaScript for this? I was sitting here trying to visualize this and came to the same conclusion as Mark. It seems like form rules would work great and be a simpler way to accomplish this.
 1,550 Points
It would be great if this could be achieved using a formula field. I am not sure how formula fields work on show hide options on other form fields.
 1,550 Points
The form rules don't work as there are hide and show constraints on same fields based on different number of activities. For example:
If number of activites =2
show assesment method 1 and 2
hide assessment menthod 3 to 10
show date 1 to 4
hide date 5 to 20
show pass fail 1to 4
hide pass fail 5 to 20
if number of activities = 3
show assessment method 1,2 and 3
hide assessment method 4 to 10
show date 1 to 6
hide date 7 to 20
show pass fail 1 to 6
hide pass fail 7 to 20.
this creates show/hide conflicts on passfail and date fields.
If number of activites =2
show assesment method 1 and 2
hide assessment menthod 3 to 10
show date 1 to 4
hide date 5 to 20
show pass fail 1to 4
hide pass fail 5 to 20
if number of activities = 3
show assessment method 1,2 and 3
hide assessment method 4 to 10
show date 1 to 6
hide date 7 to 20
show pass fail 1 to 6
hide pass fail 7 to 20.
this creates show/hide conflicts on passfail and date fields.
QuickBaseCoach App Dev./Training (Mark Shnier), Champion
 72,438 Points
No problem to use formula fields. For example make a formula field checkbox called
[Show Field 1?] and define the formula for when to show Field 1.
Then have a Dynamic Form rule that is super easy
When
[Show Field 1] is checked
Action
Show [Field 1]
[Show Field 1?] and define the formula for when to show Field 1.
Then have a Dynamic Form rule that is super easy
When
[Show Field 1] is checked
Action
Show [Field 1]
 1,550 Points
QuickBaseCoach App Dev./Training (Mark Shnier), Champion
 72,438 Points
You could use 20 formula checkbox fields.
The formula for [Show Assessment method 1]
would be
IF([# of activities]=3, true)
The formula for [Show Assessment method 1]
would be
IF([# of activities]=3, true)
QuickBaseCoach App Dev./Training (Mark Shnier), Champion
 72,438 Points
If there are additional considerations as to when to show [Assessment method 1], you just make the formula More complex.
 1,550 Points
Hello, I need to show assesment menthod 1 field when n=#of activities is from 1 to 10 similarly show assesment method 2 when # of activities from 2 to 10. Tried using case statement , I am not able to properly define the formula
QuickBaseCoach App Dev./Training (Mark Shnier), Champion
 72,438 Points
Here is a formula which will be true of the # of Activities is between 1 and 10.
[# of Activities] >=1 and [# of Activities] <=10
Use that in the rule to control if Assessment method 1 is shown.
You will need a separate formula to control if you show Assessment Method 2.
If the rules are as simple as this, then you do not need to have a formula though, just a form rule specifically and only dealing with Assessment Method 1.
[# of Activities] >=1 and [# of Activities] <=10
Use that in the rule to control if Assessment method 1 is shown.
You will need a separate formula to control if you show Assessment Method 2.
If the rules are as simple as this, then you do not need to have a formula though, just a form rule specifically and only dealing with Assessment Method 1.
Related Categories

App builders
 975 Conversations
 47 Followers

APIs & custom code
 1525 Conversations
 63 Followers

Forms
 3351 Conversations
 150 Followers

Formulas & functions
 3054 Conversations
 84 Followers

Relationships
 2678 Conversations
 51 Followers

Tables & fields
 7341 Conversations
 201 Followers

Tips & tricks
 403 Conversations
 36 Followers

Wizards and addons
 454 Conversations
 13 Followers

Discuss the community
 42 Conversations
 13 Followers