An Auto-enter calc can be trigger by any field in the table/record. For best reliability make sure that the check box, "Do not evaluate if all fields are empty"is cleared, and the "Do not replace existing value" check box is cleared.
So if the data is coming from the other side of a relationship, you have to come up with a trigger field and have some mechanism to change the value of the trigger field. This can be a step in a script that kicked ouf by a script trigger or part of a new record script. If there is a single record the set field fir the trigger field will do it, If it is a set of fields the replace field contents can do the whole set, as long as they are not locked by another user or another window.
I know I don't have the "Do not replace…"checkbox selected (checked), and the "Do not evaluate…" aspect in the calculation dialog is also unchecked.
I have a field that is unstored called "CountCasesResultCalc" that does what I want, but I cannot make it, nor the related fields "indexed" — so they are both "unstored" as well.
I have a "Let" statement that I set to the field I want to replace, "CountCasesResultCalc", but also the field "CountCasesCalc" — but I get no data in the Number field set with the following "Auto-Enter" calculation:
~trigger = CountCasesResultCalc ;
Case ( uniqueCasesCalc > 0 and CountCasesResult ≠ CountCasesResultCalc ; CountCasesResultCalc )
Case ( uniqueCasesCalc = 0 and CountCasesCalc ≠ 0 ; 0 )
Is it possible that this probelm is due to fields in preceding calcs that are "unstored"?
Thanks for responding. If you follow-up, please let me know what you see as being wrong or incorrect.
- - Scott
I think you are correct, it is the unstored calc. An unstored calc only
updates when it is displayed on a layout.
Is there a script that adds a new record? If so create numerical field in
the current table, use this field as the trigger field and the formula in
the field do the count.
Sent from my mobile device... Please excuse typos.
I believe you are correct about the unstored calc. They only update when displayed on a layout.
Is there a script that creates a new record? If so create a numerical trigger field in the main table and have the script change the value. Then have the formula do the count as a stored calc.
Apologies for the double post. Emailed it, but didn't see it so rewrote it. Then it showed up.