Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

AutoAction for formatname

  • AchLive
  • AchLive
  • OFFLINE
  • Posts: 253
  • Thanks: 14
  • Karma: 3
7 years 10 months ago #291853 by AchLive
AutoAction for formatname was created by AchLive
Hi, I set a AutoAction to update the field "FormatName". When it is executed returns this error

Unknown column 'formatname' in 'field list' SQL=UPDATE `#__comprofiler` SET `formatname` = 'NomeSecondo nomeCognome' WHERE `id` = 413

I would like to know how I can proceed.
Thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
7 years 10 months ago #291866 by krileon
Replied by krileon on topic AutoAction for formatname
You can't update formatname field. It's not stored anywhere and simply outputs name or username based off the name format parameter in CB > Configuration > General. You'll need to update Name, First Name, Middle Name, Last Name, or Username as needed if you want to adjust its output.


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.

  • AchLive
  • AchLive
  • OFFLINE
  • Posts: 253
  • Thanks: 14
  • Karma: 3
7 years 10 months ago #291874 by AchLive
Replied by AchLive on topic AutoAction for formatname
Because I use as a CB setup "Firstname" "Middlename" LastName "could fit action with this query?
Code:
UPDATE #__users SET name= [cb:if middlename=""]'[firstname]'" "'[lastname]'[cb:elseif middlename!=""]'[firstname]'" "'[middlename]'" "'[lastname]'[/cb:elseif][/cb:if] WHERE`id` = '[user_id]'

I need to update the field without having to upgrade profile because I have an action that controls whether the fields Name, Middle Name, and Last Name are formatted with the first Uppercase letter.
For even update FormatName field should move from the edit profile, otherwise remains formatted as the user wrote.
From my tests it seems that the query works well and updates the field as they are set in the fields Name, Middle name and Lastname. I want a confirmation from you, thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
7 years 10 months ago #291897 by krileon
Replied by krileon on topic AutoAction for formatname
Don't understand the need for this. You can override what formatname field outputs using the Layout parameters. You can uppercase first letter of each word strictly using CSS as well (e.g. text-transform: capitalize;). The Field action does not fire profile update triggers either so you can safely use it to modify those fields as well.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum