Flowfield Calcformula

I have a table which holds one custom contract for each customer. The contract table has fields “Starting Date” and “Expiration Date”. So, I have created a boolean FlowField in Customer table which is supposed to tell whether the customer has a valid contract. The problem is, that I can’t create a table filter that would use TODAY in value. So the facts are: FlowFilter name: ContractValid Method: Exist Field: Customer No. Table Filter (should be): “Starting Date” <= TODAY “Expiration Date” >= TODAY Attain just won’t tolerate expression TODAY in filter Value field… Any ideas?

You can: 1. Add FlowFilter “Contarct date filter” and on open form with setfilter(TODAY)on it. 2. Make func. what returns Exists contract or not and add control on with that func. I prefer 2 way, because it uses less resources.

Thanks, Dalius. Yes, I have already created a function that returns the state of the contract to the Customer form and even sets another field to true for other possible approaches on this problem. The problem really relies on reporting. Lets say there are thousands of records in both customer and contract table, and you want a list of all customers who do not have a valid contract (or otherwise) and there are a lot of contracts starting and expiring every day. It is really really slow to run a function on each record to return the state of the contract. I created a batch which updated a new ContractValid2 -field (not flowfield) for each record in customer table each time the report initialized. Even after I had done a lot of optimization on the code, it was still a very slow operation. I had to call modify on each record that needed update (not to mention locking sorrows). What I’m looking here is the information on whether there is a syntax for using these kinds of expressions in Flowfield filter value. If not, I’m very thankful for other approaches on this problem. /Pauli

I don’t think that good idea use reporting from customer side. Do reporting from Contract table it will be N times faster than flow fields. You can make reports like: “Expired customers contracts” Contract table is smaler that customer, and it are faster. And another thought: If you have huge customer table you should have a lot of users. So, where are one or two persons who uses contracts and is madness to slow down perfomance for all users by adding flow field in customer table. I’m adding flow fields only then more than 30 % of users will use it. In other cases I’m making new form or report.