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

Formula Value

Status
Not open for further replies.

bdjb

Technical User
Oct 29, 2002
292
US
Does Crystal have a function of creating a field that holds the value of a formula (similar to paste special in excell, it holds the value, not the formula). That way I could do further work on the value.

Thanks,
Bob
 
The value is always available to you within a formula, so I don't understand the request unless the idea is to use a macro susbstitution type of thing, wherein you can build a formula based on a value, in which case CR does not allow for this.

Perhaps if you demonstrated what it is you have, and what you intend to do, someone can help you.

-k kai@informeddatadecisions.com
 
That's what variables do! They hold a value(s) and then allow you to "act" on them in other formulas.

A very simple example.

Formula one-
numbervar money;
money:= [client_sales]*.10

Formula two-
numbervar money;
money;

This would display the amount from client sales*.10. There is much more to variables.
 
Thanks,
I'm using the formula "DateAdd("s", {T178.C536870925}, datetime(1970,1,1))" to convert remedy date fields. Then if I try to use the formula "Currentdate - DateAdd("s", {T178.C536870925}, datetime(1970,1,1)) = 1" (this is to pull yesterday's data)I do not get any data. I thought if I could get a value for the first one, then use it in the second, it might work.

What would also work is if there is any way to modify the buily in period to date functions of crystal (last full month, etc) to just pull the previous day.

Thanks again,
Bob
 
Remedy application? Hmm that sounds familiar??

Why are you using the DATEADD function to convert the datetime fields?

The dateadd function works something like this:
dateadd("DD",-3,{?Start Date})
This example is gives you your start date and 3 days back( the negative). 2/11/2003 {? Start Date}
2/10/2003
2/9/2003
2/8/2003

Seems you would want to convert the date field, then use the dateadd function to add your day.??


"Currentdate - DateAdd("s", {T178.C536870925}, datetime(1970,1,1))"

 
Create a formula containing:

//@convdate
dateadd("s",{T178.C536870925}, datetime(1970,1,1))

Now reference that formula in the record selection criteria (you can also place the formula in the details to see what you're getting for a date):

@convdate = currentdate-1

Can you create a SQL Expression field in Remedy?

That way you might have the database return a preformatted date, and perhaps even do the filtering for you.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top