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've got a string that is being passed into a drilldown. It is the data from a multi select variable. I have inserted '#' between each selection and now I want to convert the '#' to quotes with a comma between each one. For example if &AREASELECT is 1234#a234#f322 then I want it to be '1234','a234','f322'
I am using the following code SQL SQLORA SELECT REPLACE('&AREASELECT', '#', ''''||','||'''') AREASELECT1 FROM DUAL; TABLE ON TABLE HOLD AS SELECT1 FORMAT ALPHA END -RUN -READ SELECT1 &AREASELECT1.A ??? -RUN
however, the string being passed in can be any length, so I can't seem to get this to work.
I tried creating the string with the quotes instead of the '#' where &VSELAREA is what is passed into &AREASELECT
-SET &AREASELECT = 'ENGLAND#FRANCE#JAPAN#ITALY';
SQL DB2
SELECT REPLACE('''&AREASELECT''', '#', ''''||','||'''') AREASELECT1 FROM BASEL.TIME_D FETCH FIRST 1 ROW ONLY;
TABLE
ON TABLE HOLD AS SELECT1 FORMAT ALPHA
END
-RUN
CHECK FILE SELECT1 HOLD
-RUN
TABLE FILE HOLD
PRINT FORMAT
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN
-READ H001 &LEN.A8.
-READ SELECT1 &AREASELECT1.&LEN.EVAL
-RUN
-TYPE &AREASELECT1
I'm using DB2 SQL. The result of &AREASELECT1 is 'ENGLAND','FRANCE','JAPAN','ITALY' (including the two outer-most quotes (because I added them to the SQL REPLACE function.
As far as I know, the new HTML forms generated by Dev Studio can create a single variable with all the values selected in a multi-select, so it is possible you may not have to do this, but thanks for giving me an idea on how to use SQL to manipulate Dialogue Manager variables - this will open up new possibilities.
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
I decided to try to go about this a different way. Instead of separating the parameters by a '#' I used '*#*' instead. Then I used CTRAN twice to replace the '*' with a quote and the '#' with a comma. Next I added the opening and closing qoutes. This appears to be working so I will go with it, but if I run into more problems I will try your solution. Thanks again.
If your string is of indeterminate length then use -READ filedd, &variable (e.g. with a comma) instead of -READ filedd &variable.Ann. without the comma. This is akin to (but not the same as) using something like readln which will read an entire line of input until the end of line marker (in what ever shape or form it exists). You can then use &variable.LENGTH as per Francis to identify how long the read string is.
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