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>Multiple select for list box.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
<SOLVED>Multiple select for list box.
 Login/Join
 
Gold member
posted
Hi ,

I have sql report(Oracle database) which has prompt in it.I created list box in html composer from my prompt with multiple select option enable.If i select single value in list box i am able to run my report but when i select multiple values i am getting an error.

Here is the sample prompt in where clause.

Where VP.ID IN (&ID)

When i select mulitple values i was not able to replace OR with ,

I need to know how webfocus will process the prompts and i need to print and check how the value submitted in prompt is effecting my sql code dynamically.

Can you guys help me to figure out how to acheive this.It would be great help for me.

Thanks,
Rakesh

This message has been edited. Last edited by: Rakesh Boddu,


WebFOCUS 8.0.03
Windows, All Outputs
 
Posts: 59 | Registered: February 13, 2014Report This Post
Guru
posted Hide Post
You can do the following.

The variable being passed from the HTML, you can get the length first, then use STRREP to replace the OR with a ,

Then I like to truncate to remove all the spaces.

 -SET &WhereVPLength        = &VP.LENGTH;
-SET &WhereVPAdjust        = IF &VP CONTAINS ' OR ' THEN STRREP (&VP.LENGTH, &VP, 4, ' OR ', 1, ',', &VP.LENGTH, 'A&WhereVPLength.EVAL') ELSE &VP ;
-SET &WhereVPTru           = TRUNCATE(&WhereVPAdjust); 

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


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
quote:
STRREP (&VP.LENGTH, &VP, 3, ' OR ', 1, ',', &VP.LENGTH, 'A&WhereVPLength.EVAL')


Oops - the length of
' OR '
is 4, not 3.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Oops! - Thanks!


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
If you know the values are quoted character strings,
 ..., 6,(''' OR '''), 3,(''','''), ...

is better.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
Thanks Guys for your inputs.It worked as expected.

Especially MattC you rock man. Good One


WebFOCUS 8.0.03
Windows, All Outputs
 
Posts: 59 | Registered: February 13, 2014Report 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>Multiple select for list box.

Copyright © 1996-2020 Information Builders