Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting the first value out of a string.
>
> htp.FormOpen ('sartest.show_maintequip');
> htp.FormSelectOpen('maint_location',' Select a Location from list: ');
> FOR loc IN maintequip_list
> LOOP
> /*
> Passes both values of loc.location and loc.description to
> sartest.show_maintequip procedure as ONE value
> */
> htp.FormSelectOption (loc.location||' ->
> '||loc.description,cattributes=>'maint_location="'||loc.location||'"');
> END LOOP;
> htp.FormSelectClose;
>
> The show_maintequip procedure is
> PROCEDURE show_maintequip (maint_location in VARCHAR2)
>
> The value that get's passed for example is
> RC2262 -> Depot 1
> SARB-DROPPED -> Depot 2.
>
> I would only like to pass the first value.
>
Hi,
If you havent figured it out already, try this -
htp.formSelectOption
(loc.location||'->'||loc.description,cattributes=>'VALUE="'||loc.location||'"');
The VALUE keyword will assign the location to the variable maint_location. This should work and only one value should get passed to your show_maintequip procedure.
Murali
http://www.dbaquest.com/
Received on Fri Mar 08 2002 - 12:42:15 CST
![]() |
![]() |