0

Birthday function in tab

when clients are registered, I write down the date of birth. How do I make it so that when a birthday comes up, it will be seen in a different color in the client list.

Regards

2 replies

null
    • Fred
    • 2 yrs ago
    • Reported - view

    If you want to modify text/number in a form then you have to use the styled() command. Check the link for a detailed list of options. You can put it in an if statement to check for if the month and date match.

    if month(birthdayfield) = month(today()) and day(birthdayfield) = day(today()) then
    styled(text(age(birthdayfield)),"green","red")
    else
    styled(text(age(birthdayfield)),"","")
    end

    If you want to use conditional formatting in a table view, then you have to first create a field that contains a number or text. So you can create a formula field and use the age() command to give you a number:

    age(birthdayfield)
    

    Then add this field as a column in your table view. Then you can add something like this in the f(x) part of the conditional formatting window:

    month(Date) = month(today()) and day(Date) = day(today())
    

    Then change the other settings to your liking.

      • demo3678
      • 2 yrs ago
      • Reported - view

      Fred 

       works very well, thanks a lot. 

      I noticed one pattern, I had a different formula earlier, she considered only the age
      ageYM('Date of Birth') 

      on this very day, when today is December 27, your formula shows one year less, in all other cases everything is correct