Focal Point
[CLOSED] filling up a dropbox from a dynamicaly created hold file

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

March 09, 2017, 08:52 AM
vnf
[CLOSED] filling up a dropbox from a dynamicaly created hold file
hello,

I have a procedure1 that have several input parameters then a HOLD file "H_DROPITEM" is created. This HOLD file is created based on the selection criteria and it also has calculated fields.
in the second procedure2, I use the HOLD file "H_DROPITEM" created on procedure1 and allow the user to select some items from it.
For each of the procedures, I have created its own html.
html 1 ---> point to procedure1. At the beginning of the procedure 1, I have the following lines

-HTMLFORM IBFS:/WFC/Repository/XXX/vt_test2.htm
-EXIT


html 2 (vt_test2.htm) ---> point to procedure2

My issue is that the combo box from html 2 (procedure2) does not get updated with the most current data. Instead, it has the last run data (previous data).

Does anyone know how to make the combo box to dynamically fill up with the information from the HOLD file that gets created from the procedure1?


the procedure2.fex look like this:

TABLE FILE XXX/TST_WORKAREA/H_DROPITEM
BY H_DROPITEM.SEG01.ITEMNO
BY H_DROPITEM.SEG01.I_DROPDOWN
WHERE H_DROPITEM.SEG01.I_DROPDOWN EQ &I_DROPDOWN.(OR(FIND H_DROPITEM.SEG01.I_DROPDOWN IN H_DROPITEM)).I_DROPDOWN:.;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD FORMAT ALPHA AS H_FILTERITEMS
END

more code ...

thanks,

Vera

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.2.0.7,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
March 09, 2017, 09:09 AM
MartinY
If I understand well your request and if I also remember well (if something I've tried in the past), it's not possible to have a list box/drop list that will have, as input data, a table that is generated "on the fly".

Even if you hold the data on disk the second DL "will not see it".

Maybe if you can explain more what is your objective to have a fex that creates an hold file which will then be used by another fex to populate a DL, we can give you alternative choices such as "chained DL".


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
March 09, 2017, 09:20 AM
vnf
Hi Martin,

The project I have is as follow:
a user select an item (raw material) in my first procedure. This procedure will find recursively all the materials that it uses and then roll up all parents items and find their materials that are used. Then, calculate all cost for each parent items. From this list of items (parents Items, description,...more fields) is where I need the user to select. This is the combo box I need to fill up in my second procedure.
Then, update some files base on this selection.


thanks,

Vera


WebFOCUS 8.2.0.7,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
March 09, 2017, 09:51 AM
MartinY
quote:

a user select an item (raw material) in my first procedure. This procedure will find recursively all the materials that it uses and then roll up all parents items and find their materials that are used. Then, calculate all cost for each parent items.

This sounds to me that from a selected item you create a report that will contains parents items, description, cost and others.

quote:

... is where I need the user to select...

This sounds to me that it's a drill down from where you can then call something else.

But I repeat myself, except if something new just got up which I'm not aware off, you cannot fill up a DL from a dynamically created file.

Another option is to have a XML file with all items, parents items, description, cost and other fields PREVIOUSLY generated from which your item DL1 will refer, then your other DL2 will also refer to that XML file and using auto-chaining DL2 will be filtered according to DL1 choice.
But if there is to many records, you may have performance issue with that technic. Instead of using auto-chaining, jscript (or use jquery) can be used. I've posted a sample : Chaining with JS

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


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
March 09, 2017, 11:12 AM
FP Mod Chuck
Hi Vnf

I may be over simplifing this but the drop down box can be populated at run time by running the same procedure you use to create the hold file. Just change the ON TABLE HOLD FORMAT ALPHA AS H_FILTERITEMS to ON TABLE PCHOLD FORMAT XML.

In the html composer you will first have to add the procedure to create the output under the Requests and Data sources then when you select the drop down box under the Settings tab you can choose Dynamic / Explict (Requests Panel) and then the request and the appropriate fields to use.

Hope this helps.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
March 09, 2017, 12:29 PM
vnf
hi Chuck,

The issue with this is that I will have to run the procedure twice and each procedure takes a considerable amount of time.

Does anyone has another suggestion.

thanks,

Vera


WebFOCUS 8.2.0.7,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
March 09, 2017, 01:49 PM
MartinY
Why running twice ?
It run only once to populate the DL values, that's all.


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
March 09, 2017, 01:51 PM
MartinY
Another suggestion is to create the DL values from a night job which will includes all items, parents items, description, cost, etc.

You will them use that file as the input for your DL


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
March 09, 2017, 02:51 PM
vnf
I cannot create the file on any schedule (ahead of time) as the calculation depend on the data selected/entered by the user from the first procedure.


WebFOCUS 8.2.0.7,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
March 09, 2017, 03:40 PM
MartinY
As far as you "told" us, the user will select an item and from that selected item your fex will extract the parent item, description, calculate cost and other values.

Why this cannot be performed ahead for each available item ?

According to me, if all these calculations are previously done, it will increase the performance of everything else...

Or we are missing information to properly evaluate your need...


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
March 09, 2017, 03:58 PM
vnf
The user select item, location and cost.
the procedure1 will find all materials used for that item and then calculate the new cost. Then, a recursive loop to roll up all items and calculate the new cost and so on.


WebFOCUS 8.2.0.7,
Application Studio,
Webfocus Info-Assist
iWay Service Manager,
iWay Data Migrator
Windows, All Outputs
IBM DB2/400, MS SQL-Server 2014
March 10, 2017, 08:21 AM
MartinY
As I thought not all information has been provided to answer you need and help you.

It's sounds to me that it's much more complicated than just that.

I also think that after that the "new" cost as to be saved in the DB ?
It's possible that you are not in the right path since it doesn't look anymore as a "reporting" app.
It seems to be a data managing and you maybe should think about MAINTAIN or MODIFY.


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
March 22, 2017, 03:51 PM
FP Mod Chuck
VNF

Have you made any progress with this?

Here is a post that may help you. http://forums.informationbuild...647076086#6647076086


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats