Skip to Content Skip to Menu

copy-record/fields

  • webaholic
  • webaholic
  • OFFLINE
  • Posts: 17
  • Thanks: 2
  • Karma: 0
7 years 1 month ago #298007 by webaholic
Replied by webaholic on topic copy-record/fields
Hi Krileon,
a warm thx for ur support to my desperate "case" ;)

i know that my solution is a little complexe,

What you're trying to do however doesn't make a lot of sense and you may want to consider just redoing your fields configuration to better accommodate your needs.


so if you think of another way let me know, i am interested :)

Thank you.
So.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 1 month ago #298012 by krileon
Replied by krileon on topic copy-record/fields
I'd need to know why you're trying to extract the last value of a multiselect and what significance that last value has. The importance of that value maybe better served as being a separate field entirely, which eliminates your need to try and extract it. Regardless what you want to do is doable, but not without knowing the necessary PHP or SQL to do it.


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.

  • webaholic
  • webaholic
  • OFFLINE
  • Posts: 17
  • Thanks: 2
  • Karma: 0
7 years 1 month ago #298017 by webaholic
Replied by webaholic on topic copy-record/fields
Hi krileon,
i do some tests and it may be a step .. but i first answer you,

I'd need to know why you're trying to extract the last value of a multiselect and what significance that last value has


it's about a field who assigne a sort of professionnel status, at the instant T All members display a single value ( of the same field) and it supposed to be the last they reached professionnaly (the last value).
why should I store all the values? it is to export a history of the different status obtained for each member.
and finally, why I did not create as many fields as status (values), it is because I already have many many other fields ..

and now for my step:
i add a line of code on component file (view.user)
Code:
$user->cb_myfield = $user->cb_myfield2
and now i can copy multiselect filed's values (all of them) in another field ... but not yet the last value :(
i am seeking for the 'syntax' i must add to my line , for getting the last value .
(for information, I am an ex-developer, but I have not developed for several years, I forgot the 'grammar' :silly: :blink: )

thx a lot,

So.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 1 month ago #298031 by krileon
Replied by krileon on topic copy-record/fields
You can copy the field from 1 field to another using CB Auto Actions and maybe able to grab the last value using a format function, but the easiest approach is to just not copy it at all and use CB Code Field and some PHP to extract the last value. I can not help you regarding coding the extraction as that's for you to do; we do not provide custom coding services here. Your alternative is to just provide a single select field for them to select their professional status instead of trying to extract the last value.


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.

  • webaholic
  • webaholic
  • OFFLINE
  • Posts: 17
  • Thanks: 2
  • Karma: 0
7 years 1 month ago #298037 by webaholic
Replied by webaholic on topic copy-record/fields
I will continue my tests to find the best and the simplest for me to get rid of this pb ;)

by the way, can i ask you if u know about a plugin and/or a way to implement "back button" in the profile page ?
and to complexify a bit :) the navigation / back button should return the page-list-number we left just before
( ex. ex. I have 100 members on 4 pages of 25 lines, I am on page 3 and I open a profile page and the back button should bring me back to page 3 of my list) !?!

actually, i added a back button on profiles's pages, but it always bring me back to the first page of my list :(
thank you ;)

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 1 month ago #298055 by krileon
Replied by krileon on topic copy-record/fields

by the way, can i ask you if u know about a plugin and/or a way to implement "back button" in the profile page ?

No back button will be reliable unless you can accurately determine where they came from. This is typically done by passing an &return=BASE64_ENCODED_URL with the URL or through a cookie/session variable (not really recommended). Without that you'd just be using javascript to do a history back, which you can add using a Custom HTML field I suppose.


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