Gossamer Forum
Home : Products : DBMan : Customization :

values from other record in list box

(Page 2 of 2)
> >
Quote Reply
Re: values from other record in list box In reply to
Ahh fix one thing and another thing pops up Wink Thanks, that code DOES work. It pulls the values when modifying. But now it puts the value into the same field it is getting it from. I guess it's because of this statement:
Code:
|; print &build_mult_select_field("Guild Name","$rec{'Alliances'}","Alliances"); print qq|
Did I do that right? I want to pull the values from "Guild Name" and then put them into "Alliances". For some reason though it is pulling the values from "Guild Name" AND putting them into "Guild Name".
Quote Reply
Re: values from other record in list box In reply to
(My brain is not working too well today. Better living through chemistry!! Smile )

In the last code I gave you, change

Code:
my ($column, $value, $size) = @_;
my (@fields, @values, $output);
$size or ($size = 3);

to

Code:
my ($column, $value, $name) = @_;
my (@fields, $field, @selectfields, @lines, $line, $ouptut);
my ($fieldnum, $found, $i) = 0;
$name or ($name = $column);
$size = 3;

and change

Code:
$output = qq|<SELECT NAME="$column" MULTIPLE SIZE=$size><OPTION>---|;

to

Code:
$output = qq|<SELECT NAME="$name" MULTIPLE SIZE=$size><OPTION>---|;


------------------
JPD






Quote Reply
Re: values from other record in list box In reply to
I'll answer your last question first. I don't have a life! Smile

I'm not sure why the choices aren't showing up on the modify error form. It could be because the separator between the values hasn't been translated yet.

You can try adding this to the subroutine, just after

my ($column, $value, $name) = @_;

Code:
$value =~ s/~~/\|/g;

I don't know if it'll work, but it might. Smile


------------------
JPD






> >