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.

Create a Variable based on a object

Featured Replies

Im trying to create a single script that could send me a mail with a lot of info based on the layout the user is currently on.

For the moment i have like 18 scripts and if i have to make a change i have to change them all!

So now i decidet to create a single script that could handel all layouts.

My idea is to copy from objects set on the layout and past that in globalfields in order to make a $variable. So far so good, it works like a charm and i get all the variables i need!

Untill! a object is empty, then the previous copy will be past into the global and i get the wrong variable!

Iam trying so hard to get a variable direct from a object but so far no progression.

Now i could solve this by emptying my clipboard in the script OR (i like this more) Get a variable direct from a object (the field context)!

Hope you understand and will be able to send me the right direction!

Best regards,

Maarten-Jan

Edited by Guest

Sorry but no, I don't think it is at all clear what you're trying to do. Can you post an example file; plus give very specific examples?

  • Author

Oeps sorry, this is realy hard for me : and together with my second language english this is almost impossible.

but ill try again.

What i have is a database with about 16 layouts with different types and fields. But i always have a script in order to create a a pdf of the current layout attach it to a mail and send. The way i was working untill now is to make a script for every layout. Due to the problem the field are different in every layout. So i guessed to work with objects. In that way i could make an easy script that is getting his information by OBJECTS set on every layout. but i could not find a way to get a variable out of the objects.

Sorry if still impossible to understand :

Variable.zip

  • Author

Your kidding right? :

unbelievable, i think i better stop working with filemaker and start making sand castles im better in my last.

There are some additional things to learn here. Passing script parameters is an important tool to understand. But in your own script, there were some errors as well.

If you were to use the named object, you do not need to go to it. Instead, set variable $mail; getLayoutObjectAttribute( "mail"; "content")

As it is now, you declared a variable name; but did not set its value to anything. You would want to use get( activeFieldContents ) at this point in your existing go to object select all script.

Edited by Guest

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.