Skip to Content Skip to Menu

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

Advanced Filters in List View (and some more)

  • azjr
  • azjr
  • OFFLINE
  • Posts: 99
  • Thanks: 10
  • Karma: 2
9 years 1 month ago - 9 years 1 month ago #270251 by azjr
Hi - few questions:

1) I was playing around to see what if I want to create a list for admin's of users who have not yet logged to their accounts: this method works, but just want to double check if that's the intended use:
in filters >
"Last Online" <= 0000-00-00 00:00:00
HOWEVER, I don't see the field "Last Online" as an option in Columns - is that intentional?

2) how can I display 2 or more fields in the same line - i.e. phone number and label (mobile<span>/</span>home<span>/</span>work) - I just watched the video tutorial #8 and I think I basically, I will need to add the [cb:if...] UNDER THE phone number field - the key here is to add the [value] before the if statement: [value][cb:if...] => that's actually quite good, I was thinking how would I add the concat sql, or play with css, but that will solve it! - please confirm if I'm correct.

3) OK - here is a related one, but first an explanation:
in its basic, in user edit there are 3 phone fields (phone1,2,3) + a drop down list "Select an emergency phone#" - with the values statically entered to value1=phone1, etc. with a condition to
a) (condition1) display values phone1,phone2 if phone2 is not empty, and
b) (condition 2) values phone1,2,3 if phone3 is not empty.

(little dirty, but it works, however I would like to take it a step further, but I'm not quite sure how to go about it.
The idea:
The dropdown displays (dynamically?) actual phone numbers that were entered by the user - so instead of referring to "Phone 1" as an emergency phone, the actual number is visible so that, in a list view, it looks like this:
"Emergency phone: (999) 999-9999"
Now, I would also like to keep the condition, so that if only 1 phone# is entered, obviously that number is chosen as selected value - and so on if 2 phone# are entered, then user has an option to choose in the drop down field between those two values...

Now - as I'm writing this, I'm wondering as well if there is an easier way to do this concept... wild guess about the above is the use of auto actions, but not I'm not certain... and pounding the head against wall is not helping ;)

Thanks a lot of brainstorming with me! B)

~~~
UPDATE:
4) Can I put a condition on the column field? i.e. do not display if no value? Actually, this could be a global parameter, to hide empty fields (at least in list view) - what do you think?
Last edit: 9 years 1 month ago by azjr. Reason: forgot something

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 1 month ago #270274 by krileon
Replied by krileon on topic Advanced Filters in List View (and some more)

1) I was playing around to see what if I want to create a list for admin's of users who have not yet logged to their accounts: this method works, but just want to double check if that's the intended use:
in filters >
"Last Online" <= 0000-00-00 00:00:00
HOWEVER, I don't see the field "Last Online" as an option in Columns - is that intentional?

Fields can only be selected for display in a column if the field is set to actually display on profile. The userlist can't display a field that isn't configured to display. The field however can be on a tab in a not shown on profile position to allow it to be displayed on userlists or used in substitutions without actually displaying on profile. A lot of this confusion will be cleared up once we've layouts and a layout editor for frontend views.

3) OK - here is a related one, but first an explanation:
in its basic, in user edit there are 3 phone fields (phone1,2,3) + a drop down list "Select an emergency phone#" - with the values statically entered to value1=phone1, etc. with a condition to
a) (condition1) display values phone1,phone2 if phone2 is not empty, and
b) (condition 2) values phone1,2,3 if phone3 is not empty.

A field to select which to display then a Custom HTML field with a substitution IF statement should work. Example as follows.

[cb:if cb_emergency="phone1"][cb_phone1][/cb:if]
[cb:if cb_emergency="phone2"][cb_phone2][/cb:if]
[cb:if cb_emergency="phone3"][cb_phone3][/cb:if]

Then display the Custom HTML field on profile or your userlist for example.

4) Can I put a condition on the column field? i.e. do not display if no value? Actually, this could be a global parameter, to hide empty fields (at least in list view) - what do you think?

Yes, you can condition fields in userlist view using CB Conditional. You can even have that condition apply to just userlists by configuring the condition as follows.

For...
Registration: No
Profile Edit: No
Profile View: No
Userlists Search: No
Userlists View: Yes


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: azjr

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

Moderators: beatnantkrileon
Powered by Kunena Forum