Focal Point
[SOLVED] Master File Issue

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

October 30, 2008, 11:50 AM
<msam>
[SOLVED] Master File Issue
Hi,
I have a master file with CODE and DESC fields.
I'm using the CODE in the Value filed and DESC in display field in the Resource Layout Painter.
But the issue is the description is not coming in alphabetic order.
CODE DESCRIPTION
01 Company
02 Branch
04 Agent

I need only CODE to be passed to the launch page and I want description to be in alphabetic Order.

Regards,
MSAM

This message has been edited. Last edited by: Kerry,
October 30, 2008, 12:07 PM
GinnyJakes
You will have to populate the dropdown box with a procedure. Here is an example that I just did this week:
TABLE FILE filename
SUM CODE
BY DESC
ON TABLE HOLD FORMAT ALPHA
END
TABLEF FILE HOLD
PRINT  CODE DESC
ON TABLE PCHOLD FORMAT XML
END


Put this in a focexec and reference it for the variable. The reason I had to do it that way is because it is the first column in the XML is the one passed to the program. If you sort by the description, by default it becomes the first column.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
October 30, 2008, 12:23 PM
<msam>
I can not use the XML format as the it is to be refresed with other master files -INCLUDE file and I did try for XML . I need other option for this problem
Further help would be appreciated..

Regards,
MSAM
October 30, 2008, 02:16 PM
GinnyJakes
You misunderstood me. The master is regular text. You write a program that looks like the one in my post. You go into the HTML Layout Painter and in the control for the dropdown box, you select procedure and then point to that little program. When you run the page, WebFOCUS runs the little program and your dropdown box gets populated with the data in the right order.

Couldn't you at least try my suggestion before dimissing it out of hand?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
November 04, 2008, 12:33 PM
<msam>
Hi Ginny,
I cannot use the procedure as we have a .mas and .foc file and it is included in the main procedure which is scheduled to run daily from database. I hope you got my issue.

Regards,
MSAM
November 04, 2008, 12:39 PM
GinnyJakes
I don't really understand. If you have a master and a FOCUS file, why can't you write a procedure against them to produce the dropdown box in the order that you want then reference that procedure in the Resource Layout Painter control for the dropdown box?

Have you even tried this to see if it would work?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
November 04, 2008, 12:41 PM
<msam>
yes I did that ..that's the basic step and I want to use other than XML.

Regards,
MSAM
November 04, 2008, 12:50 PM
GinnyJakes
The WebFOCUS required format for putting stuff in a dropdown box from a procedure is XML. You won't see it as XML. You will see it as DESC sorted in the correct order. If you don't want to do this in this easy manner, then I can't help you.

Maybe someone else can. Sorry.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
November 04, 2008, 12:57 PM
<msam>
thanks for the info...