Focal Point
Converting variables to uppercase using AutoPrompt

This topic can be found at:

March 31, 2004, 02:08 PM
<Joe Filtz>
Converting variables to uppercase using AutoPrompt

WebFocus 5.2.3 with Oracle as a backend database.

Simple report using procedure viewer and autoprompt.

Prompt for variable '&state'. All values in the Oracle database are stored in uppercase (e..g, PA, OH, NY).

When user enters the state, regardless of how many times we tell them to enter it in uppercase, they enter it in lowercase and result set returned is 0.

Is there a way to convert the data entered by the user into uppercase automatically without having to do a separate html launch form and javascript?

I know that there are the 'screening' variable commands. Is there anything like that in AutoPrompt that will do the conversion for me?


Joe Filtz
March 31, 2004, 08:34 PM
joe, how about just taking the variable and letting your fex uppercase it?
there is a javascript way to upper case your variable before it gets passed to your fex,
but just do it in the fex; Work??

yes, do what Carolyn says below.
make OLDSTATE your &VAR
DEFINE FILE whatever
..then in your heading
(that [ mark is really left pointed bracket, but this board wont accept them. ok?)
see, that lpbracket means get the value from the data.
sometimes you need to make the variable a byfield with noprint (BY NEWSTATE NOPRINT)
but in this case since its the state value in your extract, you might not need to make it a BY field.
April 02, 2004, 12:17 PM
<Joe Filtz>

Thanks for the response. That can work but I don't know how the code works (see below for actual code snippet). For example, it appears that the where command and the input prompt are contained in the same where command. How could I modify the code to put the 'newstate' code in?


"Service Contact - search results by State"
" "
'&State.State (2 letter abbreviation - uppercase).'
April 02, 2004, 03:21 PM
Try adding this DEFINE to your EXEC:


then use UPSTATE in your test.