Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Synchronise ( field1 ; field2)

Featured Replies

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

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).

Didn't we discuss this already?

  • Author

Yes, comment

something alike !

It doesn't want to enter my brain !

BTW after that comes 8 and I wished some good news !

  • Author

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

GetFieldName(field) -- is this the first FileMaker Pro chindogu?

No. If you'll read more carefully, you will see there is a real problem here.

  • Author

GetFieldName(field) -- is this the first FileMaker Pro chindogu?

Hi

I can't understand the word "chindogu"...

can you explain better ?

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. :wink2:

LaRetta

Edited by Guest

  • Author

thank you, LaRetta

1)for the Chindogu meaning (in Italian something alike "cianfrusaglia")

2)for your attempt to help me

3)for your kindness

  • Author

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)

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

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.

  • Author

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 !

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.