Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
using UPCASE
 Login/Join
 
<ksarkar>
posted
Hello all,

I am using Developer Studio 5.0. I have a report that takes user input for Lastname and Firstname and returns the corresponding information from the database. This works fine but only if I use the same case as is in the database. e.g for input for Firstname 'Mark' returns the result correctly but not 'mark' or 'MARK'. I tried using UPCASE for the name but it says not a legal expression or type mismatch with output or 'value is missing for LEN'. This is my first report. Any suggestions?
One of the codes I tried is:
(UPCASE (256 , '&LNAME.Last name', 'A256' )))
OR (((UPCASE (256 , FIRST_NAME, 'A256' )) EQ (UPCASE (256 , &FNAME.First name, 'A256' ))))

where &LNAME and &FNAME are variable parameters.

Thanks!
 
Report This Post
Guru
posted Hide Post
Try this code. It will need to go before your where statement.

-SET &TEXTSIZE = 'A' | &LNAME.LENGTH;
-SET &LNAME = UPCASE(&LNAME.LENGTH,&LNAME,'&TEXTSIZE.EVAL');

-SET &TEXTSIZE = 'A' | &FNAME.LENGTH;
-SET &FNAME = UPCASE(&FNAME.LENGTH,&FNAME,'&TEXTSIZE.EVAL');
-RUN
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
<ksarkar>
posted
Hello,

The code was cut off in the previous message. The code I tried is:

WHERE
((((UPCASE (256 , LAST_NAME, 'A256' )) EQ (UPCASE (256 , &LNAME.Last name, 'A256' )))
OR (((UPCASE (256 , FIRST_NAME, 'A256' )) EQ (UPCASE (256 , &FNAME.First name, 'A256' ))))


Thanks!
 
Report This Post
<ksarkar>
posted
Thanks CurtisA,

I tried the code you sent. On Developer Studio, it wont even let me parse (which I have been facing throughout the process). I tried using your code in the HTML form I created from the report, but it gives a no HTML output page with the code being displayed.
i am not certain but maybe DS is not accepting the '.LENGTH' function. is there any command for finding the length of a string in DS? There is ARGLEN(len, data, output) buit that again asks for the length itself. Am a little lost here.

Any suggestions much needed Smiler

Thanks!
 
Report This Post
Guru
posted Hide Post
Can you create a fex with only the following code in it.

-SET &LNAME = 'uPpErCaSe';
-SET &TEXTSIZE = 'A' | &LNAME.LENGTH;
-SET &LNAME = UPCASE(&LNAME.LENGTH,&LNAME,'&TEXTSIZE.EVAL');
-TYPE This should output UPPPERCASE: &LNAME

This fex should output the following:
This should output UPPPERCASE: UPPERCASE

Then try a fex with the following code with your html page and see what happens:
-SET &TEXTSIZE = 'A' | &LNAME.LENGTH;
-SET &LNAME = UPCASE(&LNAME.LENGTH,&LNAME,'&TEXTSIZE.EVAL');
-TYPE LNAME: &LNAME
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Platinum Member
posted Hide Post
Curtis,

I have had the same problem in the past. Now I just use a Javascript to do it. In the below text I am changing the field to Caps if Characters or numeric 7 with leading zeros.

function fmtAcct(fld) {
var inStr=fld.value.toUpperCase().replace(/\s/g,'');
var tstNum=inStr.replace(/\D/g,'');
if (inStr == tstNum)
{
var padStr='0000000' + tstNum;
fld.value=padStr.substr(padStr.length - 7,7);
}
else
fld.value = inStr;

Good luck,

}
 
Posts: 117 | Location: US | Registered: February 09, 2004Report This Post
<ksarkar>
posted
Curtis,

thanks, your suggestion works so I know that the UPCASE function is working. I still have to work it into teh rest of the code but this was a big help. thanks a ton!! Smiler
 
Report This Post
<ksarkar>
posted
Curtis,

thanks, your suggestion works so I know that the UPCASE function is working. I still have to work it into the rest of the code but this was a big help. thanks a ton!! Smiler
 
Report This Post
Expert
posted Hide Post
the ARGLEN function tells you how long a text field is. no need to mess with .LENGTH
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders