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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing user inputed prompt data into variable

Status
Not open for further replies.
May 30, 2001
17
0
0
US
I come from the Cognos world and am just beginning in BO. Although I have seen responses that almost answer my question, I must be missing something. In Cognos, I am able to easily store a user's input into an object that I can reference throughout the query in the where clause simply by inserting the name of the object.

In my BO universe I have a plethora of objects that I only want to retrieve data for if the corresponding date field on the row is between two user inputs (start date and end date).

How do I store a user input into an object that can be used in the where criteria for other objects? I want to prompt the user to enter this start date and end date only once. After they enter the data, I want sales transactions that occured between that range AND the number of closed jobs that occured between that range. How can I achieve this without entering @prompt a gazillion times? Will the @variable function achieve this? I haven't been able to successfully parse an @variable function yet, so I am obviously not using it correctly, however the documentation is skimpy as it relates to the @ functions.

I have tried to exclude any database fields and simply using @prompt('Enter A Start Date','D',,,,) in the select box but I can't reference the object for other objects and it doesn't want to parse.

Any help is greatly appreciated.

 
You're going about this the wrong way. You really should not be using the "Where" portion of the objects. This feature should be very rarely used as it makes it way to easy build objects that don't work together.

Also, if you need to use @prompt or @variable, you can't use them in regular objects. You need to build condition objects.

You can then use the condition object in the queries you build.

Steve Krandel
Knightsbridge Solutions
formerly BASE Consulting Group
 
I finally figured it out. Although it won't parse, I can store the @prompt('Enter A Start Date','D') into an object and reference it throughout. Trust me this was not my idea, but I am dealing with a table that doesn't even qualify for 1st normal form. I use case statements everywhere. Total nightmare. Thanks for trying though.
 
phishman00,

When you want to reference your State Date, which syntax do you use? I have a simular problem where i am trying to pull up a Starting Balance based on the starting date.
thanks!
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top