Forum Discussion
QuickBaseCoachD
7 years agoQrew Captain
Actually, here isa format for a formula
var number Max = Max([# green], [# yellow], [#red])
Case($Max,
[#green], "Green",
[#yellow], "Yellow",
[#red], "Red")
var number Max = Max([# green], [# yellow], [#red])
Case($Max,
[#green], "Green",
[#yellow], "Yellow",
[#red], "Red")
- AylinNazlim7 years agoQrew CadetHi,
I have just a couple questions on this:
1. Is this all one formula?
2. What does the "var number" mean above?
3. #green, does this need to be the #FieldNameofTotalGreen?
4. Field Type is: Formula - Rich Text, correct?
Thanks!
Aylin - QuickBaseCoachD7 years agoQrew Captain1. Yes this is all one formula.
2. The var refers to a formula variable. it is a useful technique to make formulas more readable. Here is some help text. https://help.quickbase.com/user-assistance/formula_variables.html
3. Yes, you would put in the name of your field for the total # of green.
4. The formula is formula text , not formula rich test. - AylinNazlim7 years agoQrew CadetHi I'm almost there!
1. I'm getting this error message for the first "MAX" shown below. What does MAX refer to?
2. Just to take this one step ahead while we are talking about it. I will also like to average the formula of the Average Task Statuses to the related parent record, would I make a formula-text field on the parent table for the Averaged child records of the Grand child records? - QuickBaseCoachD7 years agoQrew CaptainPlease post your code too as I cannot correct a screen shot. It looks like the formula variable is missing the last semi colon.
We might have to rename the formula variable to call it "highest". Maybe Max is a reserved word.
The formula is using a formula variable just to increase the readability of the formula. https://help.quickbase.com/user-assistance/formula_variables.html
As for your second question, I am not understanding your question. Can you explain with an example.
- AylinNazlim7 years agoQrew Cadet
var Number Max = Max([Total Green Workstream Status], [Total Yellow Workstream Status], [Total Red Workstream Status])
Case($Max,
[Total Green Workstream Status], "Green",
[Total Yellow Workstream Status], "Yellow",
[Total Red Workstream Status], "Red") - AylinNazlim7 years agoQrew Cadet