Focal Point
[SOLVED] Variable prompts when run as INCLUDE, not when run directly.

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

September 29, 2010, 03:13 PM
ABT
[SOLVED] Variable prompts when run as INCLUDE, not when run directly.
I have a fex that works fine when run directly via Dev Studio, but when run as an -MRNOEDIT -INCLUDE (as I intend to do from here on out), I get prompted for a couple of variables. The nature of the FEX is that it first determines who you are and second, using that UserID, looks up what you have access to. It determines who you are via the &IBIMR_user and &DSTEDAUSER variables. When run from Dev Studio, it prompts for &DSTEDAUSER. If I click through the prompt (without supplying a value), everything works fine.

I believe this is because the INCLUDE gets processed at the server and he has no idea who &IBIMR_user or &DSTEDAUSER are. How can I fool it into working? Seems like I need to set a default value and then read the real value, but nothing seems to be working for me.

-IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO SETUSERRC ELSE GOTO SETUSERMR;

-SETUSERRC
-SET &PDKUSER = &DSTEDAUSER;
-GOTO ENDSETUSR

-SETUSERMR
-SET &PDKUSER = &IBIMR_user;
-GOTO ENDSETUSR

-ENDSETUSR


No output when run directly (sets variables behind the scenes so there should be none). When run from -MRNOEDIT -INCLUDE it prompts for &DSTEDAUSER.

Ideas?

-ABT

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


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
September 29, 2010, 03:40 PM
GamP
Maybe doing a -DEFAULTH for your &DSTEDAUSER variable may work.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 30, 2010, 12:25 AM
Dan Satchell
Have you unchecked the "Prompt for Parameters" box in the Properties settings for the fex? You may need to uncheck this box for both procedures.

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
September 30, 2010, 08:33 AM
Spence
this may work.

-DEFAULTS &DSTEDAUSER = ''
-DEFAULTS &IBIMR_user = ''

-IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO SETUSERRC ELSE GOTO SETUSERMR;

-SETUSERRC
-SET &PDKUSER = &DSTEDAUSER;
-GOTO ENDSETUSR

-SETUSERMR
-SET &PDKUSER = &IBIMR_user;
-GOTO ENDSETUSR

-ENDSETUSR


WF 8 version 8.2.04. Windows.
In focus since 1990.
September 30, 2010, 08:56 AM
ABT
Thanks for the feedback, been down all those roads and each was less than ideal.

- Prompt for parameters could not be unchecked since the FEXs are also being used as is in a dashboard. they need to prompt for their own parameters, but not mine for this file.

- Defaults. This just sets the value in the prompt (at least in my testing).

The major issue was that DSTEDAUSER is a client variable that the FEX (which is being run at the server) has no scope of. With my rep's aid (thanks Lee), I put a line in the config to pass that variable (with IBIMR_user's value) to the server (this is in a manual somewhere, I read it and was either confused as to if this is what I needed or too scared to do it). Clear cache, done. Hope someone else gets some use out of my headache.

-ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro