Hi. I thought it might be better to add this supplemental question here to keep the correspondence together.
I successfully got your query working :-
SELECT `id`, CONCAT( `firstname`, ' ', `lastname` ) AS name
FROM `#__comprofiler`
WHERE `cb_shac_role` LIKE '%Office%' OR `cb_shac_role` LIKE '%Befriender%'
This allows the selection of user2 in the record of user1 and allows its display in a CB List, but what I am trying to do now (and failing) is to use a similar query to display the avatar of user2 in the record of user1 and similarly to display it in a CB List.
You're using a query select field so no that won't be possible since it has no means of passing the selected value through substitutions as nested substitutions are not allowed in normal circumstances. It should be doable with a code field provided by CB Code Field using PHP and getFields API. Example as follows.
Replace FIELD_NAME with the name of your field, which should be a user id. It'd be possible with normal substitutions if the user attribute in substitutions supported a field (e.g. user="FIELD_NAME"), but at this time it does not so have added a feature ticket for that.
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.