Skip to Content Skip to Menu

Query Drop Down Single Select Field Bug

7 years 4 months ago - 7 years 4 months ago #294678 by edmundcheong
Query Drop Down Single Select Field Bug was created by edmundcheong
I think i may have found a bug in the Query Drop Down Single Select Field.

I have created a Query Drop Down Single Select Field (lets call this cb_002) with an internal query which update on another Drop Down Single Select field (lets called this cb_001).

So each time, i update cb_001, cb_002 will be updated according to where x='[cb_001]' as part of the query. So each time we have newly selected data on cb_001, cb_002 will display a set of data based on the where statement.

What i notice is the behaviour of cb_002. Upon updating cb_001, it refresh its query but the default displayed value would be the most bottom/last data of drop down single select (generated by the query).

Question one, can it be defaulted to a blank value rather than pre selecting the last value of the query?

Now next use case, i created another Query Drop Down Single Select Field; lets call this cb_003 which update on both cb_001 and cb_002. It also has a where x='[cb_001]' and y='[cb_002]' in the query.

When i change or select a value in cb_001, both cb_002 and cb_003 will refresh.

The thing is cb_002 will display a set of data which is tied according to where x='[cb_001]' in the query. And as expected, it pre selects the last data of the query.

Somehow, cb_003 shows an empty query. It will not display any values even though cb_002 has a pre selected value. (Technically it is blank eventhough the field is displaying a pre selected value)

cb_003 will only display a list of data only when i click and change or reselect a new value or the pre selected value in cb_002.

I have users asking why cb_003 is returning blanks eventhough cb_002 has automatically pre selected a value when it updated on cb_001 being updated to a new value?

It doesnt seem right from the userbility perspective. But it will definitely solve the problem if the preselected field display a blank value instead of the value upon "update on" as users will automatically select a new value which will trigger (in this case cb_003) to refresh with new values.
Last edit: 7 years 4 months ago by edmundcheong. Reason: Grammar

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
7 years 4 months ago #294681 by krileon
Replied by krileon on topic Query Drop Down Single Select Field Bug
You just don't have a blank value available for it to select so HTML will select the first value available with the lowest value. So for example if you've an option with a value of 0 it'll select it. You can add a blank value directly to the field under its Global tab by specifying an option label with no value.

Also that functionality is deprecated. You need to install CB Core Fields Ajax and under Integrations > CB Core Fields Ajax use its new update on functionality, which can apply to any field and is an upgrade to the functionality in CB Query Field and CB Code Field. It will be removed from those 2 plugins in their next major releases making CB Core Fields Ajax mandatory for that functionality.


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.

7 years 4 months ago - 7 years 4 months ago #294705 by edmundcheong
Replied by edmundcheong on topic Query Drop Down Single Select Field Bug
Thanks for the quick response Kyle..

krileon wrote: Also that functionality is deprecated. You need to install CB Core Fields Ajax and under Integrations > CB Core Fields Ajax use its new update on functionality, which can apply to any field and is an upgrade to the functionality in CB Query Field and CB Code Field.


btw, which function will be deprecated?

hopefully that we will still be able to generate a Query Drop Down Single Select with the new CB Core Fields Ajax Field..

It will be removed from those 2 plugins in their next major releases making CB Core Fields Ajax mandatory for that functionality.


The "update on" functionality?

Do you have a video or detailed some documents in the CB Core Fields Ajax?
Last edit: 7 years 4 months ago by edmundcheong.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
7 years 4 months ago #294714 by krileon
Replied by krileon on topic Query Drop Down Single Select Field Bug

The "update on" functionality?

Yes as it has been generalized and moved to CB Core Fields Ajax extending that functionality to every field type.

Do you have a video or detailed some documents in the CB Core Fields Ajax?

No, review the input parameters carefully. CB Core Fields Ajax is relatively straight forward. The parameter for Update On in CB Core Fields Ajax is configured the same ways as in CB Query Field and CB Code Field.


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