[SOLVED] display owners field/tab if their field value = viewers first /last name

5 years 3 days ago - 5 years 3 hours ago #311427 by michaelgreen252
Hello i forget how to set up auto actions..
1..what i want to do is display a field if a owners field text containing a first name/last name is equal to a viewers first name and last name. can you please refresh me?
2. can the same be done for a tab..meaning show an owners entire tab only if a field inside that tab contains field text that matches a viewers first name/last name?
3. can this field still show up in search results with auto actions applied? will search result only show to user with matching first name last name? i would prefer it be available publicly but hide when viewed via profile view. Possible?

thanks

Please Log in to join the conversation.

5 years 3 days ago #311434 by krileon

1..what i want to do is display a field if a owners field text containing a first name/last name is equal to a viewers first name and last name. can you please refresh me?

That doesn't require CB Auto Actions. You'd use CB Conditional for that. Example as follows for such a condition.

Field: First Name (firstname)
Operator: Equal To
Value: [cb:userdata field="firstname" user="#me" /]

Be sure to toggle Locations open when configuring your condition so you can set specifically where it'll apply as you'll likely want to turn off registration and profile edit conditioning for this usage. If you also want to check lastname basically repeat the above and change firstname to lastname.

2. can the same be done for a tab..meaning show an owners entire tab only if a field inside that tab contains field text that matches a viewers first name/last name?

Yes, same usage as above except add the condition to your tab.

3. can this field still show up in search results with auto actions applied? will search result only show to user with matching first name last name? i would prefer it be available publicly but hide when viewed via profile view. Possible?

CB Auto Actions wouldn't be doing anything here. Yes, you can condition for searches as well; toggle the Locations fieldset open when configuring your condition to select where the condition will be applied.


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.

5 years 2 days ago #311455 by michaelgreen252
hey thanks for the reply..this did the trick except for one problem...the owner can no longer see the field.in profile or edit view...but it does show only to the person whose name is contained in the field....

to be clear heres what i want to do
im creating 2 tabs named (crush1) and( crush 2)....in these tabs will have a field called (crush name)
so...my user will enter a persons name into the (crush name) field..and only the users name whos name matches this field can view the field.

so far i have set the field named {crush name} with conditional settings as follows
display: field conditional show
field: cb_crush _name
operator: is equal to
value: [cb:userdata field="name" user="#me" /]

now the intended viewer can see the field if their name matches the (crush name) field which is perfect....
but the owner can not see the field itself on profile view or edit view because the field itself is set to conditionally show to the viewer whos name matches the (crush name) field.

is there any way i can tweak this field to conditionally show only to the user with matching name as well as the owner?
thanks im halfway there

Please Log in to join the conversation.

5 years 2 days ago #311456 by krileon

hey thanks for the reply..this did the trick except for one problem...the owner can no longer see the field.in profile or edit view...but it does show only to the person whose name is contained in the field....

CB Conditional will block access to profile owner.

now the intended viewer can see the field if their name matches the (crush name) field which is perfect....
but the owner can not see the field itself on profile view or edit view because the field itself is set to conditionally show to the viewer whos name matches the (crush name) field.

Expand Locations then disable the condition for profile edit. You probably should do the same for Registration if the field is displayed on registration.

is there any way i can tweak this field to conditionally show only to the user with matching name as well as the owner?

Add an OR condition row and check if the profile owner is the users self using the below.

Field: Custom > Value
Value: [user_id]
Operator: Equal To
Value: [cb:userdata field="user_id" user="#me" /]

That should allow it to match if the viewing users cb_crush _name field matches the displayed user or the viewing user is the displayed user.


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.

5 years 16 hours ago #311507 by michaelgreen252
Thanks Krileon that did the trick
The following user(s) said Thank You: nant

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.224 seconds

Facebook Twitter LinkedIn