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.

Attach Varaibles to Windows

Featured Replies

With the ability to have multiple windows in any FM solution, we need to be able to attach variables to the windows. It is great to have local vars in scripts and global vars for files, but we need vars that are window dependent. Move from script to script and file to file.

Example:

key - "$$$" mean a variable that is attached to a window.

Window1: $$$User = Frank

Window2: $$$User = Paul

In window1 frank logs in to some customer record and edits the record. Frank lets Paul use his computer. Paul opens a new window (window2) and logs in to another customer record, edits it and saves. He then closes the window2 and Frank continues his work in window1.

This is just one example. The point is a user or another could open another window at anytime without us the developers knowing it, so this is why an attachable var to windows could help.

This is possible now.

Using the variables repetition each window could utilize it's own value

You would need to use a let statement as part of declaring your variable.


$$variable = 



Let(Rn = Max(1; Abs(GetAsNumber(Get(WindowName))));



// your calculation or value or field reference goes here



)



And your repetition would be:

Max(1; Abs(GetAsNumber(Get(WindowName))))

When you create new windows the value for that window will be placed in the corresponding repetition of the variable.

You can see this example working by looking at the demo provided by Ray, It's called RecordSelection

it is part of the 848 sample set provided by NightWing Enterprises.

http://www.nightwing.com.au/FileMaker/#fmp8

Edited by Guest

  • Author

This is possible now.

Using the variables repetition each window could utilize it's own value

You would need to use a let statement as part of declaring your variable.

Thanks West, but I have been using this technique for a few weeks now, and there are a few limitations to it.

1. Window name changes. The var links are lost. This is why it is not the best idea to link vars by window names. We need to link it with some kind of uniquie window ID. Filemaker could provide a function i.e. Get ( WindowID ).

2. Window name must have number in it. If the window name has no numbers in it then the technique cannot work or store a variable to one of the repetitions. See in my solutions I like to give my windows names that relate to the content it holds, so a user can quickly look through lists of names to find the window they need. Not all windows will have a number in them, such as the first one.

But I do use this technique in some parts of my solutions, just not for general window creation.

Thanks though

Ah yes I see your point :)

Ok put this one on my wish list too!

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.