Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Calculating Total of "Cost" field


Bad-Timing

Recommended Posts

Hi guys, this is the last thing I need to do to finish my system, and I am completely stuck, even my coordinator has no idea.

 

Basically I have a layout which calculates how much each "Department" is spending, through summary fields and a currently basic script

 

The idea is that the user enters the department and the date (drop down calender) they want the results to be shown from.

 

So far the script works in working out the "Total Cost" when searching by Department alone, but when searching with the "Date Range" as well, unless there is a record with that matches that date exactly, no results are found.

 

So what I was wondering if there was a way for the script to detect the date range and show records that were created after that date?

 

The script I have so far is:

 

1. Go to layout - Departmental Spending

2. Enter Find Mode

3. Perform Find

4. Set Field(Courses Attended; Get ( FoundCount )

6. Go to layout - Add to Record

5. Go to layout - Departmental Spending

 

Any help would be fantastic :)

Link to comment
Share on other sites

  • 2 weeks later...
Hi guys, this is the last thing I need to do to finish my system, and I am completely stuck, even my coordinator has no idea.

 

Basically I have a layout which calculates how much each "Department" is spending, through summary fields and a currently basic script

 

The idea is that the user enters the department and the date (drop down calender) they want the results to be shown from.

 

So far the script works in working out the "Total Cost" when searching by Department alone, but when searching with the "Date Range" as well, unless there is a record with that matches that date exactly, no results are found.

 

So what I was wondering if there was a way for the script to detect the date range and show records that were created after that date?

 

The script I have so far is:

 

1. Go to layout - Departmental Spending

2. Enter Find Mode

3. Perform Find

4. Set Field(Courses Attended; Get ( FoundCount )

6. Go to layout - Add to Record

5. Go to layout - Departmental Spending

 

Any help would be fantastic :)

 

 

I am sure there are better ways to do this, but here goes:

 

A. Create 3 global fields, a BeginDate (Date), an EndDate (date), and DateSearch (text, calculated). I actually create a GLOBAL file to keep most (sometimes all) of my global fields (but this stems back to my Clarion for DOS programing days).

 

B. The user enters the date information (make them drop down calendars) and then the DateSearch field is calculated by (BeginDate & ".." & EndDate). You can alter the calculation to suit your needs (for example:DateSearch = greater than BeginDate and less than or equal to EndDate, etc).

 

C. Yo need a step inserted between #2 an #3 (call it #2.5):

SetField (YourDateField is equal to DateSearch)

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use