TOJ Posted March 9, 2005 Author Posted March 9, 2005 When I specify Get (ActiveFieldName) in a calculation field and tab through the fields the function returns absolutely no results. I have found this with several other Get functions as well. I have tried formatting the results as text and number, makes no difference. Am I missing something totaly obvious here or have I got a bad instalation? The help menu simply states that the function returns the field name currently containing the curser. Hopfully you all will be more help than the menu.
TOJ Posted March 9, 2005 Posted March 9, 2005 When I specify Get (ActiveFieldName) in a calculation field and tab through the fields the function returns absolutely no results. I have found this with several other Get functions as well. I have tried formatting the results as text and number, makes no difference. Am I missing something totaly obvious here or have I got a bad instalation? The help menu simply states that the function returns the field name currently containing the curser. Hopfully you all will be more help than the menu.
TOJ Posted March 9, 2005 Author Posted March 9, 2005 When I specify Get (ActiveFieldName) in a calculation field and tab through the fields the function returns absolutely no results. I have found this with several other Get functions as well. I have tried formatting the results as text and number, makes no difference. Am I missing something totaly obvious here or have I got a bad instalation? The help menu simply states that the function returns the field name currently containing the curser. Hopfully you all will be more help than the menu.
Ender Posted March 9, 2005 Posted March 9, 2005 I think the Get(Active...) functions only work in scripts.
Ender Posted March 9, 2005 Posted March 9, 2005 I think the Get(Active...) functions only work in scripts.
Ender Posted March 9, 2005 Posted March 9, 2005 I think the Get(Active...) functions only work in scripts.
-Queue- Posted March 10, 2005 Posted March 10, 2005 The calculation doesn't evaluate until you commit the record or move to a different field. So if it is unstored, it will not return a value (because you are no longer in the previous field), and if it is stored, the Get function will not re-evaluate. It can be used in certain auto-enter calculations, but in general will not work with field definitions and is intended for use with scripts.
-Queue- Posted March 10, 2005 Posted March 10, 2005 The calculation doesn't evaluate until you commit the record or move to a different field. So if it is unstored, it will not return a value (because you are no longer in the previous field), and if it is stored, the Get function will not re-evaluate. It can be used in certain auto-enter calculations, but in general will not work with field definitions and is intended for use with scripts.
-Queue- Posted March 10, 2005 Posted March 10, 2005 The calculation doesn't evaluate until you commit the record or move to a different field. So if it is unstored, it will not return a value (because you are no longer in the previous field), and if it is stored, the Get function will not re-evaluate. It can be used in certain auto-enter calculations, but in general will not work with field definitions and is intended for use with scripts.
TOJ Posted March 10, 2005 Author Posted March 10, 2005 Thanks, I guess it will not be useful for my intended application then. I was hoping to be able to use the Get (ActiveFieldName) function to triger a script (using a plugin) upon the user entering a field. When combined with the If function and various scripts it could have been very useful, but allas it must return a value! I have found several other Get (Active...) functions that also return values only when a record is created or re-lookup. If you guys at filemaker are listening, it would be useful if these functions actually returned the value of the "Active" trigger while it is still active and not upon commit. Or better yet, as an option in the field behaviors, allow the developer to perform a script upon both entering or exiting a field.
TOJ Posted March 10, 2005 Author Posted March 10, 2005 Thanks, I guess it will not be useful for my intended application then. I was hoping to be able to use the Get (ActiveFieldName) function to triger a script (using a plugin) upon the user entering a field. When combined with the If function and various scripts it could have been very useful, but allas it must return a value! I have found several other Get (Active...) functions that also return values only when a record is created or re-lookup. If you guys at filemaker are listening, it would be useful if these functions actually returned the value of the "Active" trigger while it is still active and not upon commit. Or better yet, as an option in the field behaviors, allow the developer to perform a script upon both entering or exiting a field.
TOJ Posted March 10, 2005 Author Posted March 10, 2005 Thanks, I guess it will not be useful for my intended application then. I was hoping to be able to use the Get (ActiveFieldName) function to triger a script (using a plugin) upon the user entering a field. When combined with the If function and various scripts it could have been very useful, but allas it must return a value! I have found several other Get (Active...) functions that also return values only when a record is created or re-lookup. If you guys at filemaker are listening, it would be useful if these functions actually returned the value of the "Active" trigger while it is still active and not upon commit. Or better yet, as an option in the field behaviors, allow the developer to perform a script upon both entering or exiting a field.
Søren Dyhr Posted March 11, 2005 Posted March 11, 2005 I was hoping to be able to use the Get (ActiveFieldName) function to triger a script (using a plugin) upon the user entering a field I guess you use the plugin I suggested?? If so, try to make an unstored calc'field containing this: Evaluate ( "XMpl_StartScript( Get ( FileName ); "theStuff" )"; aField) ...where aField is the trigging field - only thing is it only works when leaving a field. --sd
Søren Dyhr Posted March 11, 2005 Posted March 11, 2005 I was hoping to be able to use the Get (ActiveFieldName) function to triger a script (using a plugin) upon the user entering a field I guess you use the plugin I suggested?? If so, try to make an unstored calc'field containing this: Evaluate ( "XMpl_StartScript( Get ( FileName ); "theStuff" )"; aField) ...where aField is the trigging field - only thing is it only works when leaving a field. --sd
Søren Dyhr Posted March 11, 2005 Posted March 11, 2005 I was hoping to be able to use the Get (ActiveFieldName) function to triger a script (using a plugin) upon the user entering a field I guess you use the plugin I suggested?? If so, try to make an unstored calc'field containing this: Evaluate ( "XMpl_StartScript( Get ( FileName ); "theStuff" )"; aField) ...where aField is the trigging field - only thing is it only works when leaving a field. --sd
Razumovsky Posted March 23, 2006 Posted March 23, 2006 (edited) Hi TOJ, I noticed this too, and was trying to do something similiar to what you were in order to control the firing of auto enter calcs. I accomplished it somewhat (still a prototype) by creating 2 fields: tsModified: time stamp, auto enter mod timestamp Trigger auto-entered text field (with do not replace unchecked, and do not evaluate if all fields empty unchecked) Let([ //these are the fields that an entry in would trigger the calc x=field1&field2&field3...]; Case(GetAsNumber(Get(CurrentTimeStamp))-GetAsNumber ( LeftValues ( tsModified; 1 ))>3; Trigger&Get(ActiveFieldName)&¶) ) I used >3 because I dont trust FM to evaluate both the modified timestamp and the get(currentTimestamp) to precisely the same milisecond (I think I got them to be 1 ms off at the most). This sets the Trigger field to a list of the fields identified in the first part of the let statement during an editing session to a record that are modified. On commit, it goes blank. It could use some cleaning up though, as I noticed it would produce some unexplained carriage returns in the list, and an insanely quick typer may be able to outsmart it - but I think it does hold promise! HTH -Raz *when used in a server/multi user environment, the machine on which the tsModified and get(CurrentTimestamp) need to be considered. I think using get(currentHostTimeStamp) would work, but have not quite tracked how FM has been switching where it evaluates certain calcs with the recent upgrade madness. Edited March 23, 2006 by Guest added single user disclaimer
Recommended Posts
This topic is 6883 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