Focal Point
[CLOSED] Need to extract comma seperated data from the cell.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/812106401

May 05, 2009, 02:26 PM
Prash
[CLOSED] Need to extract comma seperated data from the cell.
Hi All,
I need a quick resolution to one of my problem.
I need to diplay the content of a single cell in a following way.

Input Format:

Vendor_ID Product

Vend1 Dept:1 Prod1 Item1 , Dept:1 Prod2 Item 2, Dept:2 Prod1 Item25
Vend2 Dept:4 Prod4 Item 1
Vend3 Dept:5 Prod1 Item1 , Dept:5 Prod2 Item 2, Dept:5 Prod6 Item2

Required Format:

Vendor_ID Product

Vend1 Dept: Multiple
Vend2 Dept:4 Prod4 Item 1
Vend3 Dept:Multiple

The Input Format section contains the information of the products that each vendor supplies.Number of products is seperated by a ',' as shown in the Input format. So my requirement is that if the vendor supplies more than 1 product then we need to display as "Dept"Multiple" else if Vendoe supplies only one product then display the product as it is there in the Product Column.

Can anybosy provide me the working code using CAR/Employee DB.

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


WebFOCUS 7.1
Windows
Output: HTML, Excel & PDF
May 05, 2009, 02:44 PM
Kofi
Nice spec. You want I should give quote for doing work? I learn v quick, give good answer.

How much you pay?

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
May 05, 2009, 03:00 PM
RSquared
Prash,

Look up the GETTOK function. This is what I use for this type of requirement.
As for the Multiple, use common logic.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
May 06, 2009, 12:55 AM
Danny-SRL
Prash,

Maybe this is too simple but...

  
DEFINE FILE ...
PRODUCT=IF PRODUCT CONTAINS ',' THEN 'Dept: Multiple' ELSE PRODUCT;
...
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF