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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Using an IF in a SET

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Using an IF in a SET
 Login/Join
 
Member
posted
I'm trying to conditionally set a variable based on the existence of another variable. Basically, here's what I'm wanting to do:

IF VarA != ''
set VarB = 'and some junk &VarA'
ELSE
set VarB = ''

I tried using this:

-SET &VARB = IF &VARA = ' ' THEN '' ELSE ' and some junk &VARA';

but that doesn't seem to work so well.

Thanks in advance.
 
Posts: 19 | Registered: October 24, 2006Report This Post
Virtuoso
posted Hide Post
use EQ and NE instead of = and !=.
-SET &VARB = IF &VARA EQ ' ' THEN '' ELSE ' and some junk &VARA';


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
That did it! Thanks.
 
Posts: 19 | Registered: October 24, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Using an IF in a SET

Copyright © 1996-2020 Information Builders