Text styled function
Hello,
I have a formula field:
if 'Candidats Inscrits' < 'Max. Candidats' then
"Incomplet"
else
"COMPLET"
end
But I also would like to styled my text. For example, field in red if « Incomplet » and field in green if « COMPLET »
Thanks in advance for your help.
David.
7 replies
-
...
styled("incomplet","red")
else
styled("complet","green")
end
should do the trick
-
Thanks for your feedback, Steven.
But which global formula do i have to write to get the conditions togheter?
If "condition" then "text" and "color".
Thanks for your help.
David.
-
Not shure what you mean but is this working for you? This should be entered in a formula field.
if 'Candidats Inscrits' < 'Max. Candidats' then
styled("Incomplet","red")
else
styled("COMPLET","green")
endOr this for colored text instead of background color:
if 'Candidats Inscrits' < 'Max. Candidats' then
styled("Incomplet","","red")
else
styled("COMPLET","","green")
end -
Yes, NICE. It's exactly what i need.
Thanks for your quick help.
Have a nice day...
-
Yes, NICE. It's exactly what i need.
Thanks for your quick help.
Have a nice day...
-
Other question in the same way, is it possible, with se same condition, to have not only the field but the whole row with this layout in table view?
-
I don't think it is possible to "style" text fields or number fields.
If it has to be, you can make duplicates of the fields in a formula field and use only these fields in a table view.
ex.
if 'Candidats Inscrits' < 'Max. Candidats' then
styled('résidence',"red")
else
styled("résidence',"green")
endNote that you can not edit formula fields. For formview, you could put them in an other tab or make them invisible.
This way your layout is more acceptable.(pour le bien de layout)
Content aside
- 5 yrs agoLast active
- 7Replies
- 3705Views