Page 1 of 1

Options work like select boxes on web pages?

Posted: Wed Nov 17, 2010 8:25 pm
by jesse
The reason I ask is I need to be able to have a select box like on a webpage where
it has a Username title and userid value and a coded value like this:

Code: Select all

<option value="UserID">Username</option>
The reason I need to have a value and a display title
is because I need to do an insert based on the UserID into a database table.

The code I am using now to populate the option list is this:

Code: Select all

put revDataFromQuery(tab ,cr ,dbID ,tSQL) into tList
revCLoseDatabase(dbID)

if tList contains "revdberr" then return ""
set the rowDelimiter to cr
# the New... function below isn't implemented yet
put tList & cr & "-" into tList
set the text of button "Event" to tList

Re: Options work like select boxes on web pages?

Posted: Fri Nov 19, 2010 2:31 pm
by Janschenkel
You can use 'tags' for this. The menu specification is a list of lines that look like this:

Code: Select all

[ <modifiers> ] <label> [ '|' <tag> ] 
SZo an optional set of modifiers, followed by the label of the menu item, optionally followed by a tag. The label is displayed and the tag is used as the parameter for the menupick message instead of the label.
You can use this for multi-lingual applications as well as your use case of hiding ID's.

HTH,

Jan Schenkel.

Re: Options work like select boxes on web pages?

Posted: Thu Jun 02, 2011 2:39 am
by jesse
Thanks Jan. I'll read up on tags sounds like a good option for me.