Raybaudi Posted June 3, 2005 Posted June 3, 2005 Hi to all friends, it's possible to get the calculation of a given calculated field ? Thanks to all
Reed Posted June 3, 2005 Posted June 3, 2005 GetField() or Evaluate() are functions that you might want to look into. Dana
Raybaudi Posted June 3, 2005 Author Posted June 3, 2005 Thanks, Reed But I have to explain me better... the calc of cfield is so definited: Get(UserName) and now it's possible to read "Reed". How can I get the calc of cField ? How can I get: Get(UserName) ?
Ender Posted June 3, 2005 Posted June 3, 2005 What's the purpose? Can't you just look at the calc definition?
Raybaudi Posted June 3, 2005 Author Posted June 3, 2005 Hi, Ender and what is the purpose of: FieldComment ( fileName ; fieldName ) You can just look at field definition !! BTW I looked for a tip to look at the cField calculation and put that calc into another field, without look at the calc definition, because I like to try all FM possibilities !!!
-Queue- Posted June 3, 2005 Posted June 3, 2005 Unless you made the Field Comment equal to the calculation's definition, I do not believe there is a way to retrieve that data.
Raybaudi Posted June 3, 2005 Author Posted June 3, 2005 Hi Queue yes, so I think too. But that data is there ... and I can't get it !!
-Queue- Posted June 3, 2005 Posted June 3, 2005 You mean you cannot retrieve the Field Comment using the FieldComment function?
Raybaudi Posted June 4, 2005 Author Posted June 4, 2005 no, I mean that I cannot retrive that data from the DB ! I would like a function (as FieldComment ( fileName ; fieldName )) but in the form: FieldCalc ( fileName ; fieldName ) !!!
-Queue- Posted June 4, 2005 Posted June 4, 2005 As I said, there is no such function unless you put the definition in the Field Comment.
BobWeaver Posted June 5, 2005 Posted June 5, 2005 Piece of cake on a Mac: Perform Applescript [ tell app "FileMaker Pro" set theformula to formula of field "MyCalcField" of database "MyDbaseName" set cell "gFieldCalcFormulaResult" of current record to theformula end tell ]
MoonShadow Posted June 5, 2005 Posted June 5, 2005 You Mac people are always rubbing it in. That's okay. I'll be xplat very soon and I'll use this Apple script too. Great stuff, Bob. BUT ... what happens if this is executed on a solution running both platforms? Is that okay? Or must it's use to restricted to Mac solutions alone?
BobWeaver Posted June 5, 2005 Posted June 5, 2005 For cross platform solutions, I do this: If [abs(Get(SystemPlatform))=1] # Do mac stuff here Else # Do PC stuff here End If
Raybaudi Posted June 5, 2005 Author Posted June 5, 2005 Hi you said: Perform Applescript [ tell app "FileMaker Pro" set theformula to formula of field "MyCalcField" of database "MyDbaseName" set cell "gFieldCalcFormulaResult" of current record to theformula end tell ] and that works also if the DB is protected ?
BobWeaver Posted June 5, 2005 Posted June 5, 2005 If the Filemaker script in which the applescript is called, is set to run with full access privileges, then it will return the formula regardless of what the current user's access privileges are. If the "run with full access privileges" is left unchecked, and the current user's access privileges do not allow access to field definitions, then it will return an error.
Raybaudi Posted June 5, 2005 Author Posted June 5, 2005 Hi BobWeaver I wish to know if that applescript can look at a calculation of another DB and if Yes, if that applescript works if that DB is protected. That was my fear and that was the reason of this topic !!!
BobWeaver Posted June 6, 2005 Posted June 6, 2005 I haven't tried it in version 7 yet, but I used this technique in version 5 to create automatic documentation of databases. If you look in the sample files forum, you'll find my SoftDoc file there. I expect that if the other database is open with full privileges then you could do it from a remote script, same as in earlier versions, but if the database is open with restricted access, then I don't think you could get the formula. The same is also true of earlier versions.
Recommended Posts
This topic is 7179 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