June 19, 200718 yr I have a portal behaving very oddly. When I create a new entry in the last row of the portal, then it automatically does a find (which results in an error). When I modify a current entry it does nothing (which is what I expect). I cannot figure out what is triggering the "Find" command. I cannot find any scripts attached to this portal nor the fields in use that would do this. Thanks ahead for any help.
June 19, 200718 yr Do you have an EventScript plug-in installed? If so, it could be some field in either table is initiating the Find script.
June 19, 200718 yr Author Yes I do have an event script, but I think it is in an unrelated part. I double check...
June 19, 200718 yr Author It is behaving as if I'm activating that script. However, the fields with the eventscript attached are not being modified, so how are they being triggered?
June 19, 200718 yr Author Here is the latest through trial and error troubleshooting. The problematic event is triggered via a the calculated value for a field called "startdate". The calculation is as follows: startdate = stardate & S4HU_EventScript ( "my database.fp7" ; "Date Range Filter"; "") Is there a way to modify this calculation so that it does not run every time I add a new record to this portal?
June 19, 200718 yr Yes! By filtering by relations instead: http://www.onegasoft.com/tools/smartranges/index.shtml --sd
June 19, 200718 yr Author Thanks. Is there another solution to use in a calculation, such as using some sort of "If" statement to trigger the script only if the value of that field is being changed from what is was previously? I'm new to scripting and could use help with the syntax of such.
June 20, 200718 yr Well I do seriously mean that a plugin here is wrong, but you could stuff the call of the plugin, into a fields calculated validation instead of a calc'field. Remember that it's only in Filemaker you find calc'fields, so you more SQL'ish habits needs some consequence ...don't use calc'fields then! Alternatively learn when a layout rendering forces a re-evaluation of calc'fields thru ...why script at all when what you do is a remedy for a poorly structured solution? Try to list what your script does, to justify the use of it! --sd
Create an account or sign in to comment