Question: drop down in CB is a text text in mysql, can I change this to decimal?

4 years 9 months ago #313165 by ericmuc
I need to establish a data set in CB (for later export/import with xml) regarding external documentation, for example I need a decimal field (with . instead of the German ,) for adding for example the number of rooms of a flat, so that should be 1 or 1.5 or 2 or 2.5 and so on in the mysql field.

I would like to have a drop down function in the edit for the user and added the value/name pairs like 1/1 Zimmer and 1.5/1,5 Zimmer and so on.

And the I changed the mysql text field of the drop down field in CB into a decimal (10,1) field in mysql.

That works so far. Can you tell me whether this should be ok or do you see difficilties later on (search etc.)?

Please Log in to join the conversation.

4 years 9 months ago #313167 by krileon
You changed a dropdown field to a text field? or a text field to a dropdown field? Changing the type from dropdown to text should be fine as the text field will just output whatever the stored value was, but the Label for that stored value won't display since it's not a dropdown anymore. As for text field to dropdown that should also work fine as long as the stored values are an option available in the dropdown otherwise it'd just act as if the field is empty. Beyond that I don't understand what you're asking, sorry.


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.

4 years 9 months ago - 4 years 9 months ago #313170 by ericmuc
Oh, not enough clear described:

1 level = CB
2 level = mysql

In CB I have a drop down field, that create a text field in the mysql data bank in xxxx_comprofiler.
In mysql I change the field type from text to decimal (10,1)!

So in CB the drop down stores further in the mysql field, that works, in spite of my change from text to decimal in mysql.

So why I do this? By this I have the mysql field in the appropriate status, as the documentation of the export/import-php-tool need, to be compatible with other websites.

My question: do you see any problems here, that I don't see at the moment? May the search don't work then or something other will be problematic?

Thanks.

Please Log in to join the conversation.

4 years 9 months ago #313172 by krileon
As long as your dropdown field is only storing digits to that column then sure it's probably fine, but CB isn't going to account for that scenario so I've no clue if it may negatively impact your site in a later release.


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.
The following user(s) said Thank You: ericmuc

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.233 seconds

Facebook Twitter LinkedIn