Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default values

Status
Not open for further replies.

webfocusraj

Programmer
Aug 24, 2003
14
US
Can please somebody help me with the default values problem? If I pass '$*' as default value for a parameter and then compare it with a string, it is working fine. I am having problem comparing with a numeric value. Please help. I am using Dev Studio 5.2.
Thanks,
WFR
 
Hi

try this value.

'1 OR (1 EQ 1)'

this can work in your program?
 
That doesn't work Simaccs! I would like it to work with any numeric value (a numeric field from the database to be compared with the parameter value).
Thanks Simaccs.
 
Raj,
I ran into the same problem. I'm also using WF5.2. It turns out Simaccs is right.

Try this:
-DEFAULT &SeatsPropmt = 'ALL';
-SET &SeatsWhere = IF &SeatsPropmt EQ 'ALL' THEN '1 OR (1 EQ 1)' ELSE &SeatsPropmt;
TABLE FILE CAR
PRINT
CAR
SEATS
WHERE SEATS EQ &SeatsWhere;
END

Thanks for the solution, Simaccs.
Regards,
Michael
 
Hi Michael,
Thanks for the detailed code.
Thanks Simaccs
Regards
WFR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top