0

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 

14 replies

null
    • Jorg
    • 5 yrs ago
    • Reported - view

    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

    • John_Dempsey
    • 5 yrs ago
    • Reported - view

    Many thanks

    John

    • John_Dempsey
    • 5 yrs ago
    • Reported - view

    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

    • SMoore
    • 5 yrs ago
    • Reported - view

    I also have a table named Products/Services, I have a color coded choice field named "Type" I would like the color value of my type field to color code a text box the same color as that one. The text box is named "Name"

     

    Please help

    • SMoore
    • 5 yrs ago
    • Reported - view
    • John_Dempsey
    • 5 yrs ago
    • Reported - view

    Thanks S.Moore but that displays text and sets the colour whereas I am trying to select a specific icon to be displayed depending on the result of a formula.

    John

    • Support
    • 5 yrs ago
    • Reported - view

    You can also display an icon instead of a color.

    Use : icon("check") for example.

    Best regards, Alex

    • Support
    • 5 yrs ago
    • Reported - view

    You can aslo use the styled() element to display a field with an icon and color.

    e.g. styled(field_name, "red", "warn")

    • John_Dempsey
    • 5 yrs ago
    • Reported - view

    Thanks

    The icon(“check”) worked.

    John

    • John_Dempsey
    • 5 yrs ago
    • Reported - view

    Err, well almost!

    I have 4 of these status fields, 3 of them display the icon formatted on the left of the display box and 1 centered. How do I get them all centered?

     

    John

    • SMoore
    • 5 yrs ago
    • Reported - view

    I also have a table named Products/Services, I have a color coded choice field named "Type" I would like the color value of my type field to color code a text box the same color as that one. The text box is named "Name"

     

    Please help

    • John_Dempsey
    • 5 yrs ago
    • Reported - view

    Hmm, I am not sure I can but I will look out for the answer from someone more knowledgeable with interest.

     

    John

    • Agassi
    • 2 yrs ago
    • Reported - view

    @Mr. K.

    The link does not show icons ((

Content aside

  • 2 yrs agoLast active
  • 14Replies
  • 6623Views