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     [CLOSED] How to pass the column values to the &variable in the fex

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to pass the column values to the &variable in the fex
 Login/Join
 
Guru
posted
Hi,

I have a dropdown in the html page having the values such as ALL,ABC,XYZ,PQRSZZZ and it is a multiselect option is being enabled on the same.

Iam using this query in my fex which is as follows:
select * from table
WHERE number IN ('&id')
AND name IN ('&name');
AND board IN (&board);
END

But the problem is the values for the column named board in the table are like this :
ABC BOARD
ABC CHALK
XYZ BOARD
PQRSZZZ DUSTER

And am not sure how to pass the board column values in the above query using the IN operator or using other operators....

Any ideas/hints on how to do this is appreciated!

Thanks a lot in advance!

Regards,
IP

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Master
posted Hide Post
Check if there are any ID value associated with BOARD column. So you can pass IDs like 1,2,3 and use it for filters.

Else if you continue to use Name with space in between, then value received in WebFOCUS will be as below.
ABC BOARD, ABC CHALK, XYZ BOARD

Here you need to convert comma into single quote comma single quote as below.

'ABC BOARD','ABC CHALK','XYZ BOARD'

These values you can use it in for filtering.

Hope this helps.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Virtuoso
posted Hide Post
Or have the « Multiple: Add Quotes » option of the control set to yes will add the enclosed single quote and no need to convert the comma to « quote-comma-quote ».


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
MartinY solution should be straight forward. You can try this.
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Guru
posted Hide Post
Hi,

Thanks Martin and Ram for the solution but unfortunately I think I did not put my question in the right way.

Say if in the below query,the column named board is getting the values such as first last(single value) from the database(table) and in the html page,the static value for &board are first(1st static value) and the next value is last....Please let me know how to check for first last i.e.,board value in the table with that of &board i.e,the values being are first and the next value is being last...Iam not sure which operator to use i.e, Contains,IN,etc...
select * from table
WHERE number IN ('&id')
AND name IN ('&name');
AND board IN (&board);
END

Hope Iam clear now.

Thanks a lot for all your help!

Thanks!
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
I read thrice, still don't get it. Sorry Sweating


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Silver Member
posted Hide Post
Am not sure what you're asking. Are you after WHERE board LIKE '&board|%' ;


7.7.05 Windows.
 
Posts: 39 | Location: UK | Registered: July 11, 2012Report This Post
Guru
posted Hide Post
Hi,

Thanks Darryl !
Say the value for the board column which Iam getting from the table/database is abcd xyz which is a single value and the value which Iam passing for &board[static values] is abcd from the html page.
Please let me know how to check for board value with the &board value in the filter condition in the query used above....

Iam using IN operator and also used LIKE operator but nothing seem to be working...
Hope Iam clear now.

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Silver Member
posted Hide Post
Hi, In the code in your first post you have too many semi-colons - get rid of the one after the first of your AND statements.


7.7.05 Windows.
 
Posts: 39 | Location: UK | Registered: July 11, 2012Report This Post
Guru
posted Hide Post
Hi,

Sorry,that semicolon was present there by mistake.
Here is the query :
select * from table
WHERE number IN ('&id')
AND name IN ('&name')
AND board IN (&board);
END

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Silver Member
posted Hide Post
So you tried the like as suggested?
WHERE number IN ('&id') ;
WHERE name IN ('&name') ;
WHERE board LIKE '&board|%' ;

..and it doesn't work. Have you tried removing your two 'in' statements to make sure your problem is with &board?


7.7.05 Windows.
 
Posts: 39 | Location: UK | Registered: July 11, 2012Report This Post
Virtuoso
posted Hide Post
You are looking for &board selected value anywhere in < board > field ?
If you use the Focus TABLE FILE code, you won't have to worry about wild card characters.
So having this (if we understand your request Wink ), should work:
TABLE FILE ABC
PRINT *
WHERE number EQ &id;
WHERE name EQ '&name';
WHERE board CONTAINS '&board';
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Silver Member
posted Hide Post
Hi MArtinY,

I considered suggesting that but have always assumed that a CONTAINS would have worse performance than a LIKE when you know the data you have is at the start of the string. Do you happen to know if my assumption is true or if I have made it up!

Many thanks

(and being an old SQL programmer I hadn't even noticed the 'select *' and was thinking 'table file' - so good point there)


7.7.05 Windows.
 
Posts: 39 | Location: UK | Registered: July 11, 2012Report This Post
Virtuoso
posted Hide Post
Hi Darryl,
It's true that a CONTAINS will try to find the character set (parameter value) anywhere in the search string (field), so may become a lack of performance.
But if the searched string is at the beginning of the field, it will do the same thing as LIKE 'abc%'.
The advantage of CONTAINS is that you're not limited to search at the beginning of the string without having to change your condition.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Guru
posted Hide Post
Hi,

Thanks everyone for the solution.
But Iam passing multiple values of &board from the html page and I will also be passing the value ALL(i.e.,FOC_NONE) and Iam not sure whether the operator CONTAINS works or not.

Any thoughts on the same.

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 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     [CLOSED] How to pass the column values to the &variable in the fex

Copyright © 1996-2020 Information Builders