life036 Posted September 4, 2013 Posted September 4, 2013 Hello All, Hoping one of you fine folks can help me with a strange little problem I've got. I'm trying to create a field that you can type a value into once, and have it show up as that same value on every single record in the table. I tried just doing a global field at first, but I quickly found out that doesn't work with shared files. Silly me for actually expecting a global field to work "globally". Next I tried making a value list based on the index of said field, and then displaying it with an unstored calculation defined as the contents of that value list. I thought this was a pretty good workaround, but it turns out that it affects the performance of the database horribly when viewed on FM Go, as it is recalculating the unstored calc everytime someone does a find, resulting in 45-plus-second searches. So for my next attempt, I'm thinking about maybe putting the title in a single record in a separate table and relating it to the original table somehow. I can't figure out how to relate the table in a one-to-many relationship, though. Does anyone have any better, simpler ideas? Or any suggestions on how to relate the one-record table? Thanks in advance.
jbante Posted September 4, 2013 Posted September 4, 2013 Your one-record system preferences table is a step in the right direction. As part of your startup (OnFirstWindowOpen) script, go to a layout based on that table and load the value from your systemName field to a $$SYSTEM_NAME global variable. You can then display that global variable as a merge variable throughout your file. If you change the value, users will have to re-login to trigger a reload of the value for each user session.
life036 Posted September 4, 2013 Author Posted September 4, 2013 Thanks for the info. The thing with variables, though, is that they tend to disappear just like global fields. I'd like to define this title field about once per month, from my admin layout, and not have the users bother with title entry.
Lee Smith Posted September 4, 2013 Posted September 4, 2013 (edited) You should read up on Global Fields and Variables, as this not a true statement. Thanks for the info. The thing with variables, though, is that they tend to disappear just like global fields. I'd like to define this title field about once per month, from my admin layout, and not have the users bother with title entry. Start with this FileMaker Help topic. Using Variables. BTW, Depending on how you use them, they are different, but disappear, I don't think so. Edited September 4, 2013 by Lee Smith BTE added
jbante Posted September 4, 2013 Posted September 4, 2013 Thanks for the info. The thing with variables, though, is that they tend to disappear just like global fields. I'd like to define this title field about once per month, from my admin layout, and not have the users bother with title entry. Global variables will disappear after each user closes their session, true; but the variables would get re-populated each time the user logs back in by the OnFirstWindowOpen script. The effect is the illusion that the variable is persistent. The users would never have to bother with the admin layout, because the OnFirstWindowOpen script written by you would handle that for them.
Recommended Posts
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