Discussions

 View Only
  • 1.  Colorize words

    Posted 05-10-2022 14:55
    I am trying to create a field where the words are colorized based on day of week.

    FIELD NAME: [SKIM DATE COLOR] equals FIELD NAME: [SKIM DATE DAY]
    FIELD TYPE: RICH TEXT FORMULA

    Then, I want the this date field to have the words (for example(Friday, May 13)) to be colored based on the day of the week.

    ------------------------------
    BuildPro
    ------------------------------


  • 2.  RE: Colorize words

    Posted 05-10-2022 15:19
    Colourize the words or the background shading?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Colorize words

    Posted 05-10-2022 15:26
    The words, please

    ------------------------------
    BuildPro
    ------------------------------



  • 4.  RE: Colorize words

    Posted 05-10-2022 15:42
    try this

    var date MyDate = [SKIM DATE DAY];

    var text DayName = Case(DayOfWeek($MyDate),
    0,"Sunday",
    1,"Monday",
    2,"Tuesday",
    3,"Wednesday",
    4,"Thursday",
    5,"Friday",
    6,"Saturday");



    var text DateWords =
    $DayName
    & ", "
    &Case(Month($MyDate),
    1,"January",
    2,"February",
    3,"March",
    4,"April",
    5,"May",
    6,"June",
    7,"July",
    8,"August",
    9,"September",
    10,"October",
    11,"November",
    12,"December")
    & " "
    &ToText(Day($MyDate));

    var text Color = 
    Case(DayofWeek([SKIM DATE DAY]),
    0, "red",
    1, "orange",
    2, "purple",
    3, "blue",
    4, "black",
    5, "green",
    6, "brown");

    "<font color=" & $Color & ">" & $DateWords



    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Colorize words

    Posted 05-10-2022 15:50


    var date MyDate = [SKIM DATE DAY];

    var text DayName = Case(DayOfWeek($MyDate),
    0,"Sunday",
    1,"Monday",
    2,"Tuesday",
    3,"Wednesday",
    4,"Thursday",
    5,"Friday",
    6,"Saturday")
    &""

    var text Color =
    Case(DayofWeek([SKIM DATE DAY]),
    0, "red",
    1, "orange",
    2, "purple",
    3, "blue",
    4, "black",
    5, "green",
    6, "brown");

    &ToText(Day($MyDate));

    "<font color=" & $Color & ">" & $DateWords

    ------------------------------
    BuildPro
    ------------------------------



  • 6.  RE: Colorize words

    Posted 05-10-2022 16:04
    Got It to partially work...but is returning this



    var date MyDate = [SKIM DATE DAY];

    var text DayName = Case(DayOfWeek($MyDate),
    0,"Sunday",
    1,"Monday",
    2,"Tuesday",
    3,"Wednesday",
    4,"Thursday",
    5,"Friday",
    6,"Saturday")
    &""
    &ToText(Day($MyDate));

    var text Color =
    Case(DayOfWeek([SKIM DATE DAY]),
    0, "red",
    1, "orange",
    2, "purple",
    3, "blue",
    4, "black",
    5, "green",
    6, "brown");



    "<font color=" & $Color & ">" & $MyDate

    ------------------------------
    BuildPro
    ------------------------------



  • 7.  RE: Colorize words

    Posted 05-10-2022 16:14
    Mark,
    I got it...thx

    ------------------------------
    BuildPro
    ------------------------------