Skip to Content Skip to Menu

[SOLVED] Help with Creating a Query Field

10 years 3 weeks ago - 10 years 1 week ago #250831 by Smooth2SITF
[SOLVED] Help with Creating a Query Field was created by Smooth2SITF
Hello. I tried to search through the forum for the answer I am needing but I didn't quite find it.

Here is what I am trying to do.

I currently have a List that shows the phone numbers for the officers of my organization. It reads that information from the user profiles. Currently, since my profiles are not public, it shields people from accessing the phone numbers for all of my members and only provides those members in that list.

So what I am trying to do is add the e-mail field to it so they can e-mail the member of that list but I cant unless I make the profiles viewable by the public. I didn't want to to make them public because I don't want all of their data in that specific tab public. Along with the other stuff (but the other stuff I can fix, if this idea below works).

So, I am trying to think of a solution to get around all the data becoming public in that tab. So, what I have came up with was creating a separate tab that does not show on their profile view itself, but the data is public and it allows the data from the query field in that tab itself to be public. What I am wanting to do is have it read the data from a field in the table of said record and show up under a new query field in the new tab. That way, I can have it use that field in the list of officers so that when I make the user profile public, it doesn't show that tab on the profile (its public, but doesn't show on profile), and the original tab also isn't public so it doesn't show either. This will help me keep the rest of the data public so I can get this profile e-mail to work.

What I am want to figure out is 1) Will this work? and 2) How exactly do I write the query to do this? I am in no way a expert in SQL databases but I do know enough to get by.

If this would work, can someone help my by explaining step by step how to do it (including the formulas) so I can test and see if it would work? I really appreciate it.
Last edit: 10 years 1 week ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
10 years 2 weeks ago #251000 by krileon
Replied by krileon on topic Help with Creating a Query Field
If you need just raw data display like the raw email address then just use a delimiter field with a substitution for the field using [FIELD_NAME]. No need to query for the information. Regarding your CB Query Field questions it just executes your SELECT query and displays the results. There's not much to it other than knowing SQL and what query you want to make.


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.

10 years 2 weeks ago #251057 by Smooth2SITF
Replied by Smooth2SITF on topic Help with Creating a Query Field
Yes.

What I am looking at is trying to take the same data from of field, and placing it in another.

That way, I can put the other field in a separate Tab that does not show up on profile view, but if I use the field in a list, it does show up.

My goal is, I want to enable the profile view, but I want the contact information NOT to show on their profile, but I want certain items TO show on on a list though.

Since I am not good with this, can you explain step by step how I would create the field?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
10 years 2 weeks ago #251137 by krileon
Replied by krileon on topic Help with Creating a Query Field

What I am looking at is trying to take the same data from of field, and placing it in another.

Right, that's what a substitution does. You don't need a Query field to do this. Please see the substitution tutorial below.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb

If you're using CB 2.0 you'll need to create a "Custom HTML" field. If you're using CB 1.x you'll need to create a "Fields delimiter" field as we renamed it in CB 2.0 to be a bit more clear.


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.

10 years 2 weeks ago #251385 by Smooth2SITF
Replied by Smooth2SITF on topic Help with Creating a Query Field
Thanks for trying to help me. I apologize, im not 100% good at working with this stuff so.

I'm using the new 2.0.1 version. I have noticed a few issues so this may be a problem.

I tried to create the HTML field as you stated however, I have no clue where to set the parameters up. It appears to be missing because there is no-where to set it up at.

Can you please help me understand by walking me through it? The tutorial is not relay helping

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
10 years 2 weeks ago #251402 by nant
Replied by nant on topic Help with Creating a Query Field

Smooth2SITF wrote: Thanks for trying to help me. I apologize, im not 100% good at working with this stuff so.

I'm using the new 2.0.1 version. I have noticed a few issues so this may be a problem.

I tried to create the HTML field as you stated however, I have no clue where to set the parameters up. It appears to be missing because there is no-where to set it up at.

Can you please help me understand by walking me through it? The tutorial is not relay helping


When you create a new CB Field of type Custom HTML, you put your HTML code in the HTML editor Description parameter.

There you can use the substitution fields that Kyle have you a tutorial link to.

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

Moderators: beatnantkrileon
Powered by Kunena Forum