[ic] truncate 'option selects' when using combo select with database lookup

Mike Heins interchange-users@interchange.redhat.com
Thu Dec 13 17:04:01 2001


Quoting Elmar Meusel (elmar@schaf.de):
> 
> Hello,
> 
> here's my problem: I have a products table with a column named
> "composers". The entries in this column are often comma-seperated
> names like "Mozart, W.A." or "Bach, J.S." (without the quotes). In the
> new-item form I want to use a combo select with a lookup on this
> column, but all presented entries of the "option selects" are
> truncated after the comma (value and display), so you can only select
> "Mozart" or "Bach".
>
> Is it possible to display the whole names including the commas within
> the option selcects? I've tried to set the database entries in quotes,
> but that didn't help. I looked in the mailling lists and the docs, but
> did not found any help... (maybe I'm too blind... :-))
>
> I'm using Interchange 4.8.3 with MySQL 3.22.32 on Linux 2.2.14.
> 

You would have to give an example of your option selects. If you are
doing something like:

[accessories type=select passed="[item-data products composers]"]

then you are going to have a problem with something like

	Mozart, W.A., Bach, J.S.

for there is nothing to differentiate things. But if you do:

	Mozart, W.A.;Bach, J.S.

and 

[accessories
	type=select
	passed="[item-data products composers]"
	delimiter=";"
	]

that should work.

Alternatively, but not as elegantly in my opinion, you could use the current
setup and change the data to:

    Mozart&#44 W.A., Bach&#44 J.S.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman