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 craig_bcd - May 20, 2014

As always, I turn to the forum when I am stumped.  I searched the forum and did not find an answer that applied (though I tried a few options) but I am trying to do a search on the label of a multi-value  list field.

So the multi-value list field [services_provided] looks like this:

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

I want to allow search on the label portion of it (that is what the users will know) not the values portion of it.

The search field looks like this: 

name="title,address_1,address_2,city,state,zip,primary_phone,regional_manager,services_provided:labels,unit_director,bed_size,sq_feet,cc_fname,cc_lname,cc_title,cc_email,cc_phone,antos_pm,contract_start,contract_end,antos_savings_query"

When I use the pseudo field: services_provided:labels it does not find the records but if I change the name in the query to be just "services_provided" and put in say 4 (for Antos) it works just fine.

What can I do to facilitate the user searching on the label (not the value) and actually finding record?

Thanks as always for your help.

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 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/