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] Comma Separated Dynamic Autoprompt

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Comma Separated Dynamic Autoprompt
 Login/Join
 
Master
posted
Is there a way to pass a comma separated, list of text values (so each value need to be in single quotes) from an autoprompt?

I found this in the docs: How to Add a Dynamic Multiselect List of Values

In that I learned that you can use a comma instead of OR where it says:
quote:

operation
Specifies how to evaluate multiple values. May contain the value OR, AND, or a comma (,). If omitted, the default value is OR.


So I tried the following:
-TYPE &COUNTRY.(,(FIND CAR.ORIGIN.COUNTRY IN CAR |FORMAT=A10)).COUNTRY:.;

And do I get this returned with comma separated values:
 
ENGLAND , FRANCE , ITALY , JAPAN , W GERMANY; 

However it needs to have single quotes around each value like when OR is used:

-TYPE &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR |FORMAT=A10)).COUNTRY:.; 
'ENGLAND' OR 'FRANCE' OR 'ITALY' OR 'JAPAN' OR 'W GERMANY'; 

This message has been edited. Last edited by: FP Mod Chuck,


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Virtuoso
posted Hide Post
Try this instead:

 -TYPE &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR |FORMAT=A10)).COUNTRY:.; 


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
quote:
Originally posted by BabakNYC:
Try this instead:

 -TYPE &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR |FORMAT=A10)).COUNTRY:.; 


Yes, I have that at the bottom of my post showing how the 'OR' separated list has single quotes around each item.

I need a comma (,) separated list with single quotes around each item

Currently I have to do the following:
  
-TYPE &|COUNTRY Before: &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR |FORMAT=A10)).COUNTRY:.;
-SET &COUNTRY = IF &COUNTRY CONTAINS ''' OR ''' THEN TRIM_(BOTH, ' ', STRREP(&COUNTRY.LENGTH, &COUNTRY, 4, ' OR ', 2, ', ', &COUNTRY.LENGTH, '&COUNTRY.TYPE&COUNTRY.LENGTH') ) ELSE &COUNTRY;
-TYPE &|COUNTRY After: &COUNTRY;


And that returns:
 &COUNTRY Before: 'ENGLAND' OR 'FRANCE' OR 'ITALY' OR 'JAPAN' OR 'W GERMANY';
 &COUNTRY After: 'ENGLAND', 'FRANCE', 'ITALY', 'JAPAN', 'W GERMANY';
  


I am just wondering if it is possible to get the '&COUNTRY After' results listed above without STRREP manipulation. Since IBI does have the ability to do comma separated values by using a comma instead of 'OR', I was just wondering if it were possible to use this with alpha values as well as numeric to be able to utilize an IN statement without having to do some big ol' hairy function


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Virtuoso
posted Hide Post
Sorry, I misunderstood. There's a simplified string function called REPLACE and that seems to be easier than STRREP.


 
-TYPE &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR |FORMAT=A10)).COUNTRY:.; 
-SET &NEW_COUNTRY= REPLACE(&COUNTRY, ' OR ', ',');
-TYPE COUNTRY: &COUNTRY
-TYPE NEW_COUNTRY: &NEW_COUNTRY 


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 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] Comma Separated Dynamic Autoprompt

Copyright © 1996-2020 Information Builders