Neuronal Nerd Posted June 19, 2007 Posted June 19, 2007 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.
Ender Posted June 19, 2007 Posted June 19, 2007 Do you have an EventScript plug-in installed? If so, it could be some field in either table is initiating the Find script.
Neuronal Nerd Posted June 19, 2007 Author Posted June 19, 2007 Yes I do have an event script, but I think it is in an unrelated part. I double check...
Neuronal Nerd Posted June 19, 2007 Author Posted June 19, 2007 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?
Neuronal Nerd Posted June 19, 2007 Author Posted June 19, 2007 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?
Søren Dyhr Posted June 19, 2007 Posted June 19, 2007 Yes! By filtering by relations instead: http://www.onegasoft.com/tools/smartranges/index.shtml --sd
Neuronal Nerd Posted June 19, 2007 Author Posted June 19, 2007 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.
Søren Dyhr Posted June 20, 2007 Posted June 20, 2007 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
Recommended Posts
This topic is 6367 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 accountSign in
Already have an account? Sign in here.
Sign In Now