It appears that you cannot set a -DEFAULT value to an amper-variable.
-DEFAULT &START_DATE = &STARTDATE
The auto-prompt displays &STARTDATE. Anybody have a workaround. The .EVAL also does not work.This message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8
Windows, All Outputs
June 08, 2018, 11:01 AM
BabakNYC
What's the value of &STARTDATE? You're setting an & with another &.
WebFOCUS 8206, Unix, Windows
June 08, 2018, 11:01 AM
Doug
TRUE: "It appears that you cannot set a -DEFAULT value to an amper-variable."
There are work-arounds...This message has been edited. Last edited by: Doug,
June 08, 2018, 11:17 AM
Les J
It really doesn't matter what the value is but if I do..
What I have is a -INCLUDE that sets the default start date to the previous 28 days. This works for my HTML pages but the focexecs that the users create themselves who do not use HTML pages, I don't want them to have to enter the dates every time if they don't need to change those values.
I do that -DM commands in INCLUDE and the TYPE command shows the correct value but it's the auto-prompt value that's the issue. It displays the literal variable name and not the value.
WebFOCUS 8
Windows, All Outputs
June 08, 2018, 03:38 PM
Doug
What's the properties of the "Prompt For Parameters" on the fex (Yes or No)?
June 10, 2018, 01:50 PM
j.gross
Bear in mind the order of execution: Autoprompt is triggered by a static analysis (pre-scan) of the code, before any lines (whether DM of FOCUS) in the fex are executed. At that point, none of the amper vars have actually been instantiated. In shore, Autoprompt can only assemble prompting text based on the static content of the fex file.
To overcome that you'd have to generate fex code dynamically, in which the computed values are hardcoded in the -DEFAULT statements, and then (after a -RUN) EX or -INCLUDE it (in a manner that gets by the client-side pre-scan). But I'd hestiate to venture out on that limb in a production application.This message has been edited. Last edited by: j.gross,