in order to generate html option elements for a selection element, we have the following working code (in file myholdings.fex):
TABLE FILE TABLE_FILE_FOR_DATA SUM COMPUTE txt1/A1000=''||MY_COLUMN_NAME||''; BY LOWEST MY_COLUMN_NAME NOPRINT WHERE ASIAKAS EQ '&SOMEVAR' ON TABLE HOLD AS 'hldoptions_xyz' FORMAT ALPHA END
in order to test that a copy of the above code is working, i copied it and changed the associated part to: ON TABLE HOLD AS 'hldoptions_abc' FORMAT ALPHA
this should provide the exact same drop down options, except that i should be able to access it with !IBI.FIL.hldoptions_abc ... just to see that its working,
the above file is included into my html and here is the select element: -INCLUDE myholdings
< !-- the above works perfectly -->
!-- the above doesn't work -->
Also this is the error that i get: 0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1 0 NUMBER OF RECORDS IN TABLE= 11 LINES= 11 0 NUMBER OF RECORDS IN TABLE= 2 LINES= 2 0 NUMBER OF RECORDS IN TABLE= 8 LINES= 8 0 NUMBER OF RECORDS IN TABLE= 8 LINES= 8 (FOC36225) UNABLE TO OPEN FILE hdloptions_abc SPECIFIED BY WEBFOCUS TABLE
any ideas people.. perhaps something i missed out?
thanksThis message has been edited. Last edited by: damercytrain,
WebFOCUS 8.0 Windows, All Outputs
May 12, 2013, 05:43 PM
Waz
You say it does not work.
What happens ?
Have you checked to see if the same number of records are produced.
Have you looked at the HTML page ? Are there some records not all, or no records ?
Is there an error in the code ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
May 13, 2013, 04:58 AM
Twanette
My experience in the past has been that the HOLD file name (or SAVE file name) should be 8 characters or less, and referred to in upper-case.
WebFOCUS 8.2.06 mostly Windows Server
May 13, 2013, 05:52 AM
Dave
Shouldn't that be
!IBI.FIL.yourholdname;
( WITH a semicolon ?)
_____________________ WF: 8.0.0.9 > going 8.2.0.5
May 13, 2013, 08:24 AM
damercytrain
@Waz i added the error that i am getting. but the problem is that when i change the hold part for the original one from hldoptions_xyz to hldoptions_awe ... it works (the !IBI.FIL.hldoptions_awe), so it's not making sense to me :/ @Twanette if that was the case than hldoptions_xyz shouldn't work, but it does @Dave just forgot to add the semicolon, in the actual code it exists, i just forgot to post it in the forums.
WebFOCUS 8.0 Windows, All Outputs
May 13, 2013, 10:11 AM
JL
This worked fine for me. Did you have
-HTMLFORM BEGIN
and
-HTMLFORM END
?
DEFINE FILE CAR
COUNTRY_OPTIONS/A500='<OPTION VALUE="'||COUNTRY||'">'||COUNTRY||'</OPTION>';
END
TABLE FILE CAR
PRINT
DST.COUNTRY NOPRINT
BY COUNTRY_OPTIONS
ON TABLE HOLD AS HLDOPTIONS_XYZ FORMAT ALPHA
END
TABLE FILE CAR
PRINT
DST.COUNTRY NOPRINT
BY COUNTRY_OPTIONS
ON TABLE HOLD AS HLDOPTIONS_ABC FORMAT ALPHA
END
-HTMLFORM BEGIN
<SELECT>
!IBI.FIL.HLDOPTIONS_XYZ;
</SELECT>
<SELECT>
!IBI.FIL.HLDOPTIONS_ABC;
</SELECT>
-HTMLFORM END
Year(s) of experience in WebFOCUS: 5+. Using WebFOCUS 7.7.03 on Windows platform with Oracle/SQL Server.
May 13, 2013, 05:40 PM
Waz
Have you checked to see if the file is created, and where it is ?
TABLE FILE TABLE_FILE_FOR_DATA
SUM
COMPUTE txt1/A1000='<option value="'||MY_COLUMN_NAME||'" '| '' |' />'||MY_COLUMN_NAME||'</option>';
BY LOWEST MY_COLUMN_NAME NOPRINT
WHERE ASIAKAS EQ '&SOMEVAR'
ON TABLE HOLD AS 'hldoptions_xyz' FORMAT ALPHA
END
-RUN
? FILEDEF
! DIR
-EXIT
This should list the locations of the allocated files and the contents of the agents directory.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
May 14, 2013, 05:27 AM
Twanette
Hi @damercytrain, Well, perhaps it is truncating the filename. Or perhaps you're just luckiy now, but may be less lucky if you upgrade to a version newer than 7.6. As per the 7.7 manual, there are a number of references to the limit when using "!IBI.FIL.":
quote:
Create a procedure: a. Include the following command ON TABLE HOLD FORMAT HTMTABLE AS report where: report is the name of a virtual file that contains the report output. The name can be from 1 to 8 characters. Do not include an extension.
and
quote:
Include the following command to save the values to the allocated file. ON TABLE HOLD FORMAT ALPHA as textfile where: textfile is the name of the file. The name can be from 1 to 8 characters.
WebFOCUS 8.2.06 mostly Windows Server
May 16, 2013, 06:53 AM
damercytrain
thanks for all your help. i fixed it. Turns out it was a typo: IBI.FIL.hdloptions_xyz rather than IBI.FIL.hldoptions_xyz