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'm looking to show the variable selection in the heading of this report. The variable can contain multiple values from the list box control. I found my answer on this forum, however I keep getting a prompt for &CNTR and &skill0. What am I doing wrong.
The first time &skill0 is used, it has not been set anywhere, thus the prompting. The easiest might just be to use -DEFAULT &skill0 = 0 . That would eliminate the prompting. Otherwise a value has to be declared or calculated previously to its first reference. (Also, the REPEAT/ENDREPEAT commmand shouldn't have an 'E' on the end.
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, 2007
I think I may need to explain what I'm looking for. What I want to do is replace my multi select variable in my header to read ex. Skills: 1,17,21,45 ect. instead of Skills: '1' or '17 or '21' or '45' ect. Thanks!
A little cumbersome, but here is one way to do it in Dialogue Manager using the UPCASE, PATTERN, STRREP, and EDIT functions. Variable &OUTLEN needs to be 1 less than the length of variable &Skills plus the number of numeric values you expect in &Skills (to make room for the commas being added). I picked the arbitrary number of 10, which would allow up to 11 numeric values in &Skills. If you expect more than 11 values, then you would need to increase the size of &OUTLEN accordingly.
-SET &Skills = '''1'' OR ''17'' OR ''21'' OR ''45''';
-SET &OUTLEN = &Skills.LENGTH + 10 ;
-SET &SKILLS_UC = UPCASE(&Skills.LENGTH,&Skills,'A&Skills.LENGTH');
-SET &PATTERN = PATTERN(&SKILLS_UC.LENGTH,&SKILLS_UC,'A&SKILLS_UC.LENGTH');
-SET &STRING = STRREP(&PATTERN.LENGTH,&PATTERN,4,' AA ',5,'$$$$,',&OUTLEN,'A&OUTLEN.EVAL');
-SET &MASK = STRREP(&OUTLEN,&STRING,1,'''',1,'$',&OUTLEN,'A&OUTLEN.EVAL');
-SET &RESULT = EDIT(&Skills,&MASK.QUOTEDSTRING);
-TYPE Skills = &Skills
-TYPE RESULT = &RESULT
This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
You can also do it more simply with just the UPCASE, STRIP, and STRREP functions. (Sorry, but since I discovered how nicely the PATTERN function works with EDIT, I am always looking for ways to use it.) UPCASE may not be necessary either, but ensures the word 'OR' is always capitalized. This approach also avoids the necessity to define an output length (&OUTLEN in my previous example), because removal of the single quotes and 'OR's will make more than enough room for the added commas.
-SET &Skills = '''1'' OR ''17'' OR ''21'' OR ''45''';
-SET &SKILLS_UC = UPCASE(&Skills.LENGTH,&Skills,'A&Skills.LENGTH');
-SET &STRING = STRIP(&Skills.LENGTH,&Skills,'''','A&Skills.LENGTH');
-SET &RESULT = STRREP(&STRING.LENGTH,&STRING,4,' OR ',1,',',&STRING.LENGTH,'A&STRING.LENGTH');
-TYPE Skills = &Skills
-TYPE RESULT = &RESULT
This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007