help regarding cb userlist using custom user field

13 years 10 months ago #136693 by sameerfortune4
Hello all,

i am working on a website which needs a cb listing page with custom field eg position. so i want to sort the list on the basis of position.

can this be done?

regards
sameer

Please Log in to join the conversation.

13 years 10 months ago #136741 by krileon
Sort the fields by tab position? Don't fully understand your request. You can sort userlists by editing the list within List Management and changing the Sort By to meet your needs.


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 to join the conversation.

13 years 10 months ago #137145 by sameerfortune4
Replied by sameerfortune4 on topic Re:help regarding cb userlist using custom user field
krileon wrote:

Sort the fields by tab position? Don't fully understand your request. You can sort userlists by editing the list within List Management and changing the Sort By to meet your needs.


Hello krileon,
i am making a website in which i have a userlist which have a custom field position(designation of person) in a company and i will need them sorted by positions

like
first person-> manager
second person -> assistant manager
third person -> developer
fourth person -> trainee
etc

so it is sorting based on positions and not on any name or user name field.

let me know if u didn't get it


regards
samreer

Please Log in to join the conversation.

13 years 10 months ago #137150 by Muuurgh
Hi Samreer

Not to preempt Krileon, but since I've just done the same thing it's fresh in my mind.

I created my custom fields, and then created a user list. The area you're looking for is the Sort By section. On the line there is a drop down that lists all CB Fields, which direction they're sorted (ASCending or DESCending order) and then the "add" button which will add it to the sort list.

The problem which I believe you will have is that the hierarchy of positions is not alphabetical, so that won't work for you straight away. I'd suggest setting up a hidden field, of type integer, and create the hierarchy by assigning them each a number.

I'd also suggest separating each level of the hierarchy by 10, so you can add people inbetween easier in the future. That's a tip I've learnt about sorting that has been incredibly helpful that I wish I knew years ago.

Hopefully that helped and didn't confuse you :)

Please Log in to join the conversation.

13 years 10 months ago #137154 by krileon
Easiest approach is to append an integer to the values, please see the following example. This would allow sorting alphabetically.

01 Manager
02 Assistant Manager
03 Developer
04 Trainee

Another option is to create a userlist for each one of those and thus do not have to have 1 giant list sorted. Users could then simply select the list from the drop-down select and choose which they want to display.

Post edited by: krileon, at: 2010/07/06 15:15


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.181 seconds

Facebook Twitter LinkedIn