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] Need logic for passing single or multiple values in single parameter from UI

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Need logic for passing single or multiple values in single parameter from UI
 Login/Join
 
Member
posted
Hi All,

Currently i'm using the below logic for passing single or multiple values like below.And below code i'm using

(APP-1 &RPT_VALUE L00000 (ONLY SINGLE value)),
(APP-2 &RPT_VALUE EXAMPLE ('L00000') OR ('L00000','L00001','L00002') SINGLE OR MULTI Values



-SET &RPT_VALUE_1=TRIMV('B',UPCASE(600, &RPT_VALUE, 'A600'),600,' ',600,'A600V') ;
-SET &PIN_IN = &RPT_VALUE_1.LENGTH;
-SET &PINCHK_2 = STRREP(&PIN_IN,&RPT_VALUE_1,1,'(',0,'',&PIN_IN,'A&PIN_IN.EVAL');
-SET &PINCHK_2 = STRREP(&PIN_IN,&PINCHK_2,1,')',0,'',&PIN_IN,'A&PIN_IN.EVAL');
-SET &PINCHK_2 = STRREP(&PIN_IN,&PINCHK_2,1,'''',0,'',&PIN_IN,'A&PIN_IN.EVAL');
-SET &PINCHK_2 = TRUNCATE(&PINCHK_2);

But i need the logic for below process.I tried in different ways not working.

(APP-1 &RPT_VALUE L00000 (ONLY SINGLE value)),
(APP-2 &RPT_VALUE EXAMPLE L00000 OR L00000|L00001|L00002 SINGLE OR MULTI Values.

Thanks..

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


WebFOCUS 7.7.03 Windows 7, Excel,HTML,PDF
 
Posts: 11 | Registered: August 27, 2014Report This Post
Virtuoso
posted Hide Post
This replace the pipe | by a comma :
-SET &RPT_VALUE = 'L00000|L00001|L00002';
-SET &RPT_VALUE_1=TRIMV('B', UPCASE(600, &RPT_VALUE, 'A600'), 600, ' ', 600,'A600V') ;
-SET &PINCHK_2 = STRREP(&RPT_VALUE_1.LENGTH, &RPT_VALUE_1, 1, '|', 1, ',', &RPT_VALUE_1.LENGTH, 'A&RPT_VALUE_1.LENGTH');
-SET &PINCHK_2 = TRUNCATE(&PINCHK_2);

-TYPE &PINCHK_2


But if the possible values are coming from a control list you can check on the Multiple option. Your issue here is to manage the pipe sign which is a concatenator in IBI. Having &RPT_VALUE enclosed by quotes, it works otherwise the pipe sign is not passed because it concatenate the values.

Why are you trying to manage pipes and where they come from ?


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
Member
posted Hide Post
User is expecting 123|124|125 in place of passing ('123','124','125') pipe isd used to jst divided the value


WebFOCUS 7.7.03 Windows 7, Excel,HTML,PDF
 
Posts: 11 | Registered: August 27, 2014Report This Post
Member
posted Hide Post
Martin
the above logic is not working,yes you are correct pipe is used for concatenate the values otherwise in place of ('A123','A124','A125') ----->to pass like this A123,A124,A125,so it will display the forms for the given pin each
A123
A124
A125


WebFOCUS 7.7.03 Windows 7, Excel,HTML,PDF
 
Posts: 11 | Registered: August 27, 2014Report This Post
Virtuoso
posted Hide Post
Why passing 123|124|125 ? This is just a display for the user on the UI, isn't it ?

Pass 'A123','A124','A125' to your fex and display 123|124|125 to the user.

You can create a list such as this (sample may look stupid but just to show you the technic) :
DEFINE FILE CAR
LST   /A32V = COUNTRY || '|' || COUNTRY || '|' || COUNTRY;
CD    /A32V = COUNTRY || ',' || COUNTRY || ',' || COUNTRY;
END
TABLE FILE CAR
PRINT LST
BY CD
-*ON TABLE PCHOLD FORMAT XML
END

With FORMAT XML it become a valid format for UI.

Where the available values are coming from, a TABLE file ?


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
Member
posted Hide Post
Martin,
I will try to explain you clearly,Example assume that they are 100 people working in a company for those employees has unique id called EMPID,5 people are resigned from that company.so the HR will pass 1 or 3 or 5 EMPID at a time(In UI he will check the check box) to generate those relieving letter forms.for those currently in webfocus we are accepting like belo
1) &EMPID ('L00000') OR L00000 (ONLY SINGLE value)),
2) &EMPID EXAMPLE ('L00000','L00001','L00002','L0003','L0004') MULTI Values.

I need L0000(single value)
L0000,L0001,L0002(multiple values
or
L0000|L0001|L0002


WebFOCUS 7.7.03 Windows 7, Excel,HTML,PDF
 
Posts: 11 | Registered: August 27, 2014Report This Post
Virtuoso
posted Hide Post
Hi Maddy1,

You don't need to manage the pipe or the comma.

Instead of having check boxes, in your UI you just need a control list box having "Multiple" property set to "Multiple" and because it's alpha value, you should also have property "Multiple : Add quotes" set to "Yes".

Because you've checked "Multiple" property, WF will manage the single or multiple selection made by your user and format the values list accordingly.

You just need a fex that will create a list of available values (in your case a list of EMPID) that can probably be retrieved from a table somewhere.

Managing multiple selection is better using list box than check box. The list box is built for that.

In below example, CARMODEL (the PRINT field) it's what the user see on the UI but MODEL (the BY field) it's what the parameter has as value :
DEFINE FILE CAR
CARMODEL /A45V = CAR || ' - ' | MODEL;
END
TABLE FILE CAR
PRINT CARMODEL
BY MODEL
ON TABLE PCHOLD FORMAT XML
END

And having a control list box using that code with proper properties, the user can process multi or single selection.

Then, if you need the selection made formatted in a specific way to pass it to a third party let say, it's going be easier to do it because your received parameter (the user selection) will always be in the same format. Such as for a single selection : 'L00000'
or for multiple selection : 'L00000' OR 'L00001' OR 'L00002'

So using STRREP you can remove the quotes and the OR if they are not needed.

If not clear enough, I'm suggesting you to contact IBI to have a remote session where someone can show you what I'm trying to explain.

Maybe I'm still missing some elements to understand your issue, but from what I'm understanding, this is the solution.


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
Member
posted Hide Post
Martin,

Thanks for your information.Basically values are getting from java end i will accept those values and given Compound PDF pages.


WebFOCUS 7.7.03 Windows 7, Excel,HTML,PDF
 
Posts: 11 | Registered: August 27, 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] Need logic for passing single or multiple values in single parameter from UI

Copyright © 1996-2020 Information Builders