Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7992 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

To calculate the pieces in stock I have a total in stock field (=unstored

calculation Purchasepiece-sum(sold)).

Because of the fact that we need to search alot on this field, I made

a field on the layout that can be indexed.

So I made a button that updates the totals that inserts the total in stock

in the indexed field

I wonder what is best

make a loop that goes through the whole stock and use

set field

or just use replace contents - relookup contents

thanx

Bruno

Posted

I think it depends on how big your database is. If it is very large, then a looping script would take a long time. It would be better to "replace with calculated result" where the calculation is simply the name of your total-in-stock field.

If the db is large, then this could still take a long time, though. I wonder if there is a way to use a conditional function in a find? If you could find all records where the total-in-stock calc field is different from your working in-stock field (that is, just the records where the info has changed since the last time you updated the field) then you could relookup just the records that need it, 200 records instead of 200,000, for example.

Steve Brown

This topic is 7992 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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