Jump to content
Sign in to follow this  
filemuker

summary over one field of selected

Recommended Posts

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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Not sure what you mean by "selected records". Summary fields summarize the found set of records.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Pete 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.