11 years ago
2
Topic

Hello,

I just begin to test Seblod and I would like to know if it's possible to calculate a category (Senior, Junior...) depending on birthdate and current year

AGE (for the season) =IF(MONTH(sysdate) < 9; YEAR(sysdate)-1;YEAR(sysdate))-YEAR(Birthdate)

CATEGORY=IF(AGE<9;"-9";IF(AGE<11;"Poussin";IF(AGE<13;"Benjamin";IF(AGE<15;"Minime";IF(AGE<17;"Cadet";IF(AGE<19;"Junior";IF(AGE>=40;"Vétéran";"Sénior")))))))



Thanks


Get a Book for SEBLOD
11 years ago
1
Level 1

Hi PtitPhilippe,

Thank you for your post. Your issue can be solved by javascript code

In order to solve your issue, we need to know the ids of categories: Benjamin, Minime, Cadet, Junior and Vétéran. Then, you should add, for example "free text" field in hidden position. You can write this javascript code in this field.

Regards,
Mehdi.

11 years ago
0
Level 2

bonjour,

j'ai une catégorie parent "catégories d'age" id 24

puis des sous catégories -9 ans - U9 (id 25), Poussin - U11 (26), Benjamin - U13 (27), Minimes - U15 (28), Cadet - U17 (29), Junior - U19 (30), Sénior (31) et vétéran (32)

Get a VIP membership