Link to home
Start Free TrialLog in
Avatar of kali958
kali958Flag for United States of America

asked on

Run Formula once on form

I have a field on a form with the following formula

Results:=@DbLookup("Notes":"NoCache";"";"Position";Level_8;"P_Name");
@If(@IsError(Results);"0";@Count(Results))

It basically goes out and counts how many grade 8 associate are in the database. I have to run this report weekly and I store the results "report form" and view.  The problem is that if I go back and edit a older report to put comments in or adjust it, it will recalculate this formula to today's value. I would only like this to calculate once, on creation and save. Is there a way to set that on the form. I have tried various ways and I keep getting errors. Any help would be most appreciated.

Thanks
SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think that won't work, if the field must be editable in a new document.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Suggesting a status of some kind??
Avatar of marilyng
marilyng

Yeah, or a comparison at the very least.. you know, when the form opens, grab the value of some field and put it in an "_OLD" field, when you save, compare the current with the "_OLD" and if they don't match, well, push a new value to the date field.

It would need some kind of "YO!" trigger... :) Yes?
Of course, we're having a good time discussing the possibilities... kali, we need your input!
Avatar of kali958

ASKER

thank you so much everyone for your input, i was out of the office today - let me try the computed with the new code in and see what happens when the report is generated. I will be able to complete looking at it by tomorrow morning. I think that having a check on the formula will help but also there is a mix of computed and editable fields in this report. So let me double check everything and get back to you by Thursday morning. thanks again for all the help!!!!
Avatar of kali958

ASKER

Thank you so much. This "report" is actually bigger than my first question. I have field that need to be computed when composed but I also have fields that need to be editable but pull in a number from another location and I have to let the associate running this report be able to adjust some the numbers. So some fields I could set to the Computed when Composed, so they can not change that number, but then on the editable fields the I combined the answer from Sjef and Marilyng - I needed to be able to vaildate that it did the look up in the correct week but still let it be editable in another field and merge the two together.  Thanks again!