how search on the label of a multi-value list field

6 posts by 2 authors in: Forums > CMS Builder
Last Post: June 5, 2014   (RSS)

By claire - June 4, 2014

Hi Craig

Sorry for the late reply, we're catching up on the older forum threads now.

Can I confirm what exactly you're trying to do? Preferably a URL, if you have something I can look at.

If this is a search on the front end, it will probably be easier to do it with Javascript. If you want to do it through CMSBuilder, you should be able to change the multi-value list field to use the labels, not the numbers, like so:

EVS
Patient Transport
Linen
Antos

Hope this helps.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By craig_bcd - June 4, 2014

Hi Claire -

Thanks - it's a membership only site so I don't want to post the username and password publicly but I could email it to you if you want - in the meantime I will see if I can be more clear.

I have a table with organization profiles (name, address, city state...etc.) as fields.   There are also services (field name = services_provided) which is defined as a multi-value checkbox field where the choices are defined as:

1|EVS
2|Patient Transport
3|Linen
4|Antos

An organization may take advantage of one, or multiple services, from that list.

I defined a search form with all of the fields using  _query in the "name" section of the form (see below)

name="title,address_1,address_2,city,state,zip,primary_phone,services_provided,unit_director_query"

if I search for "EVS" for example it does not find any records, it only finds them if I search on "1".  Obviously the user isn't going to know the correlation, I need to be able to search on "EVS" and find the associated records.  I tried to change the field name in the search form to: services_provided:labels but it does not work.

Please let me know if you understand or want me to email you connection information.

thanks again for your help

By claire - June 4, 2014

Hi Craig

I think I understand what you're trying to do. I'll have a chat with a few other devs here and see what we can come up with.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By craig_bcd - June 4, 2014

Hi Claire - thank you so much!

By claire - June 5, 2014

Hi Craig

I've talked it over with another dev here and I don't think there's a quick fix available for this one. I did confirm that the pseudo field won't work in the search query at least.

Is it possible for you to remove the number values from the list, or do these reference another table?

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/