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.
I have a Dialog Manager variable that contains a "&" e.g. &SYSTEM = "P&C Canada". I realize that this will cause problems. One solution I know of is to change the value of the variable to "P&|C Canada". Is there any other way to use the variable without changing the value?This message has been edited. Last edited by: Francis Mariani,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Things are complicated by the fact that I have an & in a variable and I want to replace it with &| both of which are special characters for Dialog Manager.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Works the same way in 7.6.9 but I can't understand why the .EVAL works. Logic says that it should make no difference as the A&F1V1L1 is interpreted as A11 anyway.
I "fix" data inputs using STRREP as well and I haven't found a better way for me yet (always open to suggestions though). The main ones that we encounter are in free format text notes fields where the app adds line CRLF when the user hits "new line".
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Perfect timing on this post! I have the same issue with data values containing the Ampersand character ('Lawn & Garden'). I'm already doing a STRREP to remove the OR and replace it with a comma. Then I pass these values to a SQL Passthru query and, oddly enough, they worked even though they looked like ('Lawn & Garden').
However, to be safe I think I'll use the .EVAL method you show here.
Regards,
Dan
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007
I've had my morning coffee and I'm still not quite "getting it".
I create a fex like this:
-SET &F1V1 = 'P' | '&' | 'C Canada';
-TYPE &F1V1
TABLE FILE CAR
HEADING
"&F1V1"
PRINT CAR
WHERE WARRANTY EQ '&F1V1' ;
-* You can also use &F1V1.QUOTEDSTRING
END
which yields this:
P&C Canada
TABLE FILE CAR
HEADING
"P&C Canada"
PRINT CAR
WHERE WARRANTY EQ 'P&C Canada' ;
END
NUMBER OF RECORDS IN TABLE= 0 LINES= 0
-SET &F1V1 = 'P' | '&' | 'C CANADA';
-SET &SELF1 = IF '&F1V1' EQ 'PCG CANADA'
- THEN 'WHERE WARRANTY NE ''PCG (TOTAL)'' AND COUNTRY NE ''ITALY'''
- ELSE 'WHERE WARRANTY NE ' | '''&F1V1''';
-TYPE &F1V1
SET EMPTYREPORT=ON
TABLE FILE CAR
HEADING
"&F1V1"
PRINT CAR
&SELF1
END
-RUN
&SELF1 gets evaluated as
WHERE WARRANTY NE '&F1V1'
Putting a .EVAL in
-SET &SELF1 = IF '&F1V1' EQ 'PCG CANADA'
- THEN 'WHERE WARRANTY NE ''PCG (TOTAL)'' AND COUNTRY NE ''ITALY'''
- ELSE 'WHERE WARRANTY NE ' | '''&F1V1.EVAL''';
results in an error: (FOC295) A VALUE IS MISSING FOR: &C
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server