raymanj Posted October 12, 2005 Posted October 12, 2005 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.
Ocean West Posted October 12, 2005 Posted October 12, 2005 (edited) 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 October 12, 2005 by Guest
raymanj Posted October 12, 2005 Author Posted October 12, 2005 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
Ocean West Posted October 12, 2005 Posted October 12, 2005 Ah yes I see your point Ok put this one on my wish list too!
Recommended Posts
This topic is 6985 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