filemuker Posted April 16, 2007 Share Posted April 16, 2007 I have one field with [ kilometers ]. Sometimes I make a selection of records. With a scriptbutton, I want to calculate the summery of field "kilometer" from the selected records, the result should be shown in a seperate field. I know this must be done with a calculation -)), but with which one, this is the question for me as beginner... Link to comment Share on other sites More sharing options...
Fitch Posted April 16, 2007 Share Posted April 16, 2007 Since you're doing this as a script, try something like this: Go to record[First] Loop Set variable[$total; $total + kilometer] Go to record[Next;exit after last] End Loop Set field[myTotal;$total] Note that the field is only set on the last record. I'm not sure exactly what you're proposing here though, so let us know if you need more help. Link to comment Share on other sites More sharing options...
comment Posted April 17, 2007 Share Posted April 17, 2007 Why not simply use a summary field = Total of kilometers? Link to comment Share on other sites More sharing options...
filemuker Posted April 17, 2007 Author Share Posted April 17, 2007 Why not simply use a summary field = Total of kilometers? yes it looks simple. but how to use a summery field only for selected records? Link to comment Share on other sites More sharing options...
comment Posted April 17, 2007 Share Posted April 17, 2007 Not sure what you mean by "selected records". Summary fields summarize the found set of records. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6213 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now