Raybaudi Posted October 21, 2005 Posted October 21, 2005 Hi,friends I wish to submit you a problem... Field1 contains the word: PIPPO Then in a calculation: 1) if I write: getField(Field1) I obtain: PIPPO 2) if I write: quote(Field1) I obtain: "PIPPO" 3) if I write: Field1 I obtain: PIPPO 4) if I write: "Field1" I obtain: Field1 I would want to obtain: Field1, but in a dynamic way... that because the name of the field could change, and just this thing serves to me in order to estimate the calculation with the Case() function. I cannot therefore write it like in the fourth example! Something would serve me (than it does not exist) of the type: GetFieldName(field1)!! Exists a way or it does not exist? All it would serve for the custom function, that synchronise the two content fields, leaving them both editable: Synchronise (field1; field2) that, with the following code, works... Let([ fieldName = Get (ActiveFieldName) ]; Case( fieldname = "field1"; field1; field2 ) ) but, as it is looked at from the antepenultimate line, it works only if a field is called: field1
Ender Posted October 21, 2005 Posted October 21, 2005 I'm not sure why you'd want two fields that hold the same exact thing, but for your CF, I think you could send the name of the field to the CF instead of trying to use get(activefieldname).
Raybaudi Posted October 21, 2005 Author Posted October 21, 2005 Yes, comment something alike ! It doesn't want to enter my brain ! BTW after that comes 8 and I wished some good news !
Raybaudi Posted October 23, 2005 Author Posted October 23, 2005 Hi all friends as FileMaker hasn't a function like: GetFieldName(field) I can't make an "if" around the Get(ActiveFieldName) function.... but I can with Get(ActiveFieldContents) !! So the custom will be: Synchronise ( field1 ; field2 ) ____________________________________________ Let([ fieldContents = Get ( ActiveFieldContents ) ]; Case( fieldContents = field1 ; field1 ; field2 ) ) ____________________________________________ Synchronise.zip
Vaughan Posted October 24, 2005 Posted October 24, 2005 GetFieldName(field) -- is this the first FileMaker Pro chindogu?
comment Posted October 24, 2005 Posted October 24, 2005 No. If you'll read more carefully, you will see there is a real problem here.
Raybaudi Posted October 24, 2005 Author Posted October 24, 2005 GetFieldName(field) -- is this the first FileMaker Pro chindogu? Hi I can't understand the word "chindogu"... can you explain better ?
LaRetta Posted October 24, 2005 Posted October 24, 2005 (edited) Chindogu here, Daniele. I like your tenacity and spirit! But no, I have no ideas for you; although variables popped into my mind as something to consider here, since their scope can exist outside of script and they can remain persistent in a calculation until, ummm, file closes? I don't have 8 yet so I'm stabbing in the dark. But I BELIEVE in stabbing in the dark - that's the only way new things are discovered ! You GO guy. LaRetta Edited October 24, 2005 by Guest
Raybaudi Posted October 24, 2005 Author Posted October 24, 2005 thank you, LaRetta 1)for the Chindogu meaning (in Italian something alike "cianfrusaglia") 2)for your attempt to help me 3)for your kindness
Raybaudi Posted October 24, 2005 Author Posted October 24, 2005 Hi Vaughan Here,only for you, some other old FileMaker "Chindogu": Get(FileName) Get(LayoutName) Those function are unuseless ... because you can perfecty write: "fileName" or "LayoutName" in a function like: FieldNames ( Get(FileName) ;Get( LayoutName) ) !! BTW I'm a Chindogu Maker (look at my user Title)
Vaughan Posted October 26, 2005 Posted October 26, 2005 Hi Daniele The function "GetFieldName( fieldname )" requires that the name of the field be known before the function can be called, which returns the name of the field. Hence the function itself serves no purpose, perhaps other than that of existance itself. Perhaps in your original post you meant to write "GetFieldName( file )"? Either way, no offence to you was intended. And may you wear the badge of FileMaker Pro ChindoguMaker long and with pride! Vaughan
comment Posted October 26, 2005 Posted October 26, 2005 The function "GetFieldName( fieldname )" requires that the name of the field be known before No. When fieldname is a parameter in a custom function, it is not known beforehand to the function's author. Try to write a custom function that returns the number of the last non-blank repetition of repeatingfield - perhaps then it will become clear.
Raybaudi Posted October 26, 2005 Author Posted October 26, 2005 Either way, no offence to you was intended. And may you wear the badge of FileMaker Pro ChindoguMaker long and with pride! Hi Vaughan I had understood (with LaRetta's help) that you did not mean to offend to me !! Didn't you look at the SMILE ? And, YES, I'll wear the badge of FileMaker Pro ChindoguMaker ! (many thanks for this kind word... I was searching a good one for me, as I didn't like the word "member" as my user title !) BTW comment has hunderstood me... please look at his post carefully !
Recommended Posts
This topic is 6967 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