Lists: Using the advanced filter

12 years 4 months ago #184699 by bhesketh
Lists: Using the advanced filter was created by bhesketh
I would still like to filter results based on some of the current users values for fields such as City or State. I also have other checkbox fields in my users accounts which I would like to match with the current user in order to display appropriate results for the list.

While I can write my own SQL to do this, is there a way I can grab the *current* users details/object/fields *within* the advanced filter box in order to build my query? And if not, is there a way/place I can hack in some code to make that happen? I will have over 6000 users in a professional directory where I would like to give regional results - based on the location of the currently logged-in user. Once I get that to work I can filter the results further based on other criteria in the logged-in users account.

Thank you for your time.

Please Log in to join the conversation.

12 years 4 months ago #184753 by krileon
Replied by krileon on topic Re: Lists: Using the advanced filter

is there a way I can grab the *current* users details/object/fields *within* the advanced filter box in order to build my query?

Yes, any substitution you supply is based off the viewing user. For example [user_id] gives you the user id of the viewing user (logged in user). Please see tutorials within my signature for further information on substitution usage.


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.173 seconds

Facebook Twitter LinkedIn