Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

[SOLVED] Is it possible to make a list with age calculations in it without having a field

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
7 years 11 months ago - 7 years 11 months ago #290679 by fribse2011
Hi there

Being a small volunteer club we have some obligations of giving our number of memberships to the local municipal.
They want it divided in a ton of age groups.
Part of joining us is giving your birthday.
My dream scenario would be to have a list with sub headers with agegroups.
So one list that does:
0-9 years old
xxx
xxx
xxx
10-14 years old
xxx
xxx
xxx
xxx
15-18 years old

etc. etc.

A simpler version would be to have their age shown in a column, like
xxx 8
xxx 10
xxx 12
xxx 12
xxx 16
xxx 16

etc. etc.
A bit less fancy, but it would work.

Is it at all possible to just calculate the age directly in a column? Or do I need to put it in a field first, and somehow have that calculate the age from their birthday?

I know I can make seperate lists, so that I can create one list that shows 0-9, the next list shows 10-14 etc.etc but that is a bit clumsy for our girl sending in the numbers :-)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
Last edit: 7 years 11 months ago by krileon. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
7 years 11 months ago #290687 by fribse2011
I've made a small submenu for this, with seperately defined lists, she can work with that, and it works perfectly.
It would be cool to be able to do a masterlist that shows these lists one after another somehow :-)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
7 years 11 months ago #290700 by krileon
You'd need to convert the birthdate to age in SQL then use it as an Advanced Sorting on your userlist. You'd be able to sort oldest to youngest or youngest to oldest, but looks like your usage would just be youngest to oldest. As far as grouping them I'm not sure how you'd go about that as there's nothing in the HTML to really help with that, but they'd be ordered properly at least.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
7 years 11 months ago - 7 years 11 months ago #290767 by fribse2011
Ok, so it's much easier to do seperate lists for the different ageintervals like:
( ( YEAR( NOW() ) - YEAR( ue.`cb_birthday` ) ) < 13 )
As you helped me with previously.

A feature request would be to have a 'masterlist' that would take each of these lists in sequence under each other :-)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
Last edit: 7 years 11 months ago by fribse2011.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
7 years 11 months ago #290812 by krileon

A feature request would be to have a 'masterlist' that would take each of these lists in sequence under each other

That's a pretty specialized feature that likely will never happen until long in the distant future where you'll be able to likely substitute in views. Quickest way to do that now is basically iframes or something like Components Anywhere in a Joomla article (we've a user doing this successfully).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: fribse2011

Please Log in or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
7 years 11 months ago #290869 by fribse2011
The Components Anywhere sounds like a very cool idea! I'm already using a few tidbits from Regular Labs. I'll try and build something from that.

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum