
Icon and Colour field types
Is it possible to set the value of these field types within a formula?
As an example, I would like to set an icon field to a green tick icon if something is true or a blue cross if false.
Thanks
John Dempsey
-
Hi John,
In order to do that you can use a formula field and the styled function in a formula like follows:
styled(Client.'First Name', if Client.'First Name' like "Dan" then
"yellow"
else
"grey"
end, if Client.'First Name' like "Ho" then
"res"
else
"blue"
end, if Client.'Last Name' like "Me" then
"shot"
else
"plant"
end)
The names of the available icons you can find in the database 01_iconset.ninox here:
https://www.dropbox.com/sh/p3bafxtwfvkw2ik/AAAtlHV-MAF7ZFq02iupNxmZa?dl=0
Best Jörg
-
I am still having trouble understanding this.
I have two date fields in a table called 'bookings' and I want to display the icon "check" if the field 'expiry date' is <= field 'departure date' else the icon "x"
Do I put the style formula in the trigger on update section of an icon type field type or is it the formula field type itself that displays the required icon?
What would be the code to enter?
Many thanks
John
-
Also, John.
See this article, it may help you: https://ninoxdb.de/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/color-of-formula-field-5ac81b476f8f216ae7f2c9dd