Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Sorting of list based on meaning of entry?

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
11 years 7 months ago - 11 years 7 months ago #222529 by fribse2011
I know the above is probably a very confusing headline, but I need a function that can sort a list, based on a field's content, but not alphabetically.
We have a board, and there are specific functions in the board, eg. chairman, xo, boardmember etc.
I would like to show a list and always have a specific order, the chairman on top, followed by the xo, followed by boardmembers.
Currently I have a multiselect field that contains: 1. chairman, 2. xo, 3. boardmembers
That way I can sort it alphabetically, but I'm getting questions about the numbers.

Is there another way I can do the sorting. I thought about creating a field where the sorting number is present, but it has to be automatic calculation, as the member administration can't change two values for the same change (too complicated).
Then I could just sort after that field, and not show it, but how do I construct that field?

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: 11 years 7 months ago by fribse2011.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 7 months ago #222605 by krileon
Replied by krileon on topic Sorting of list based on meaning of entry?
CB has no such feature. I suppose the best way to do this is a CB Auto Action to update a hidden field with a value baed off the value(s) of your multi-select then use that hidden field for sorting. For example if the multi-select contains "Chairman" then update the hidden field as "1", etc.. You'd want to use a Field action on the after registration (front and backend) and after profile update (front and backend) to cover all scenarios.


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
11 years 7 months ago #222624 by fribse2011
Replied by fribse2011 on topic Sorting of list based on meaning of entry?
Ahh, I see, so do I need to create an autoaction for each value of the multi-select field, or can I combine them into 1 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: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 7 months ago #222629 by krileon
Replied by krileon on topic Sorting of list based on meaning of entry?
You'll need to create an action for each sorting value. Then use conditionals to condition against your field. For example if the only value that adds sorting of "1" is "Chairman" then condition that the field contains "Chairman" (use Contains operators on multi-selects).


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
11 years 7 months ago - 11 years 7 months ago #222656 by fribse2011
Replied by fribse2011 on topic Sorting of list based on meaning of entry?
As the field is not a multi-select, but just a select, I opted for using equal to, but I can't make it work.
The field values for cb_bestyrelse are:



The Autoaction I've created is:



I've created 8 different depending on the value of course.

But I can't make the value appear in the Bestyrelsesort field (the sort field is NOT read-only, but it is on a published non-shown tab).

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.
Attachments:
Last edit: 11 years 7 months ago by fribse2011.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 7 months ago #222695 by krileon
Replied by krileon on topic Sorting of list based on meaning of entry?
Your value on the left is not a substitution. That's just a string so it's literally matching string to string. You need to make it a valid substitution by surrounding it with brackets (e.g. [cb_fieldname]).


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.

Moderators: beatnantkrileon
Powered by Kunena Forum