I have a master file created on top of a stored procedure which accepts an input variable username. I need to be able to use the result output in the dropdown values. How do I do this?
TABLE FILE CONTRACT_LIST
PRINT
CONTRACTNAME
WHERE @WFUSERNAME = 'testuser'
ON TABLE HOLD AS CONTRACTLIST
END
-RUN
TABLE FILE db_contracttab
PRINT
CONTRACTNAME
WHERE CONTRACTNAME EQ &CONTRACTNAME.(FIND CONTRACTNAME IN CONTRACTLIST |FORMAT=A30).CONTRACT NAME:.QUOTEDSTRING;
END
Error occurred during Autoprompt processing CONTRACTNAME NoDB : (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: CONTRACTLISTThis message has been edited. Last edited by: FP Mod Chuck,
App Studio Version 8202 windows Platform SQL Server 2008/2012
December 18, 2019, 09:43 AM
NARSA
Hi,
use ( APP HOLD APPNAME )
APP HOLD baseapp
TABLE FILE CONTRACT_LIST PRINT CONTRACTNAME WHERE @WFUSERNAME = 'testuser' ON TABLE HOLD AS CONTRACTLIST END
-RUN
TABLE FILE db_contracttab PRINT CONTRACTNAME WHERE CONTRACTNAME EQ &CONTRACTNAME.(FIND CONTRACTNAME IN baseapp/CONTRACTLIST |FORMAT=A30).CONTRACT NAME:.QUOTEDSTRING;
ENDThis message has been edited. Last edited by: NARSA,
WebFOCUS 7x & 8x
December 18, 2019, 02:58 PM
MartinY
ATTENTION !!!
Using APP HOLD folder (as NARSA sample baseapp) may create problem if more than one user can execute your procedure "in the same time".
Both users will create and hold the file in the same location with the same name and potentially with different data since the WHERE clause is on the user name. In result that user1 may see the data from user2 or vice versa.
Even this said, it will not work because the file must exist prior to the fex execution to have the autoprompt working which is not the case since it will exist only on fex execution. The reason of that it's because autoprompt run prior to the file creation.
Try with the below and you will have the same error :
-* Part A
APP HOLD baseapp
END
TABLE FILE CAR
BY COUNTRY
WHERE COUNTRY NE 'ITALY';
ON TABLE HOLD AS COUNTRYLIST FORMAT FOCUS
END
-RUN
APP HOLD
END
-* End Part A
-* Part B
TABLE FILE CAR
PRINT CAR
MODEL
BY COUNTRY
WHERE COUNTRY EQ &COUNTRY.(FIND COUNTRY IN baseapp/COUNTRYLIST |FORMAT=A10).Country:.QUOTEDSTRING;
END
But if you run the file creation first (Part A) then the second part (Part B) with the autoprompt, it will work because the file exist
Is this part of a Portal where other option than autoprompt may be used ?
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
December 18, 2019, 03:47 PM
vaayu
You can always use foccache to keep it specific for a user session to hold files.