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     [SOLVED] dialog manager help with amper variables

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] dialog manager help with amper variables
 Login/Join
 
Silver Member
posted
Hi,

I can't seem to get the following syntax to work. I am trying to convert a term code into a year and a season. The codes are 6 characters (really all numbers). The first four represent the year and the last two represent the season (fall or spring). If the season is fall, then you need to subtract 1 from the year. If the season is spring, then you use the year "as is". So, 202020 is Spring 2020, but 202010 is Fall 2019. When I run my report I want the user to enter the term code and then I want to figure out the semester so that in my headings I can say "Spring 2020" or "Fall 2019".
In the code below, &term_season, &term_year1, and &term_year2 work fine when I -TYPE them out, but I can't get &term_year to work. I keep getting a syntax error. I've tried a bunch of things but can never get it to work. Any help would be appreciated!


-SET &term_season = IF EDIT(&term_code,'$$$$99') EQ '10' THEN 'Fall' ELSE IF EDIT(&term_code,'$$$$99') EQ '20' THEN 'Spring' ELSE 'Other';
-TYPE term_season is &term_season
-SET &term_year1 = EDIT(&term_code,'9999');
-TYPE term_year1 is &term_year1
-SET &term_year2 = &term_year1 - 1;
-TYPE term_year2 is &term_year2
-SET &term_year = IF &term_season EQ 'Fall' then &term_year2 ELSE IF &term_season EQ 'Spring' THEN &term_year1 ELSE '';
-TYPE term_year is &term_year

Here is my output:

An error has occurred

Detail:
term_season is Spring
term_year1 is 2020
term_year2 is 2019
ERROR AT OR NEAR LINE 28 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC266) IF .. THEN .. ELSE .. SYNTAX ERROR

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 39 | Registered: March 02, 2005Report This Post
Platinum Member
posted Hide Post
Hi leo13,

The SYNTAX ERROR is because your first then is lower case ... it needs to be THEN (Upper Case)


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Master
posted Hide Post

Agreed. The keyword THEN needs to be capitalized.

Also, I have noticed that when using DM commands, it is helpful to use the .EVAL or .QUOTEDSTRING on the parameters:

-SET &term_year = IF &term_season.EVAL EQ 'Fall' THEN &term_year2.QUOTEDSTRING ELSE IF &term_season.EVAL EQ 'Spring' THEN &term_year1.QUOTEDSTRING ELSE '';

This message has been edited. Last edited by: Hallway,


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report 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     [SOLVED] dialog manager help with amper variables

Copyright © 1996-2020 Information Builders