June 9, 200916 yr wasnt sure where to post this, so I picked layouts... I would like to have a configuration layout where common fields would be set that would be used elsewhere. For example: On config layout, user would fill in the field COMPANY NAME. I would like that field to be a global field that can be used on ony other layout where company name is needed. My problem is - how do I create this config layout to only allow ONE record... meaning users cannot add records and create more configs. Imagine it like the account profile here - a series of fields, but they cannot have multiple records for me. I do not need each user to have a config - this config would be just one set of fields for the entire application - regardless of who is using it. Im at a loss of how to make it only allow one record set.
June 10, 200916 yr This is often referred to as a "preferences table". Do NOT make the fields in the prefs table global: they need to be normal fields. You can access the pref fields by either using a cartesian join to the Prefs TO, or (as I prefer) making global calculation fields for each field, and referencing these (global fields can be referenced from unrelated tables). My experience with creating global calculated fields is somewhat checkered: often they don's seem to work unless I take the file off the server and open it locally. Hopefull YMMV and be better than mine. The way to prevent the preferences record from being deleted or new prefs records created is to restrict those actions in the user's privilege set. They will always be available in the Full Access account. Be aware, however, that if a clone is made of the file then the preferences table will be empty. (This is not a reason to avoid prefs tables, just a gotcha to watch for.) It means that cloned file will require some assembly before they can be used. If you feel like being *really* cool, create a startup script that checks the prefs table and if there are no records create one and set default values for all the necessary fields. This will help make clones immediately useable.
June 10, 200916 yr Author Thanks Vaughan I will work with this info later this week! I appreciate your help.
June 11, 200916 yr Author in playing around with this, I thought of an approach Id like to run past you guys - If I created a layout for Preferences - where a user could set a company name field that would be used everywhere.... what about putting the fields in the header or footer and having no details section? Wouldnt that give the effect of only setting one value and not really adding new records? when they open it, it would either be set, or blank if no one set it - there wouldnt be a bunch of "preference records". As a check - couldnt I run a script trigger that would count the records and look for more than 1 and disallow it? I know this isnt the preferred way - but wouldnt it work?
June 11, 200916 yr Just turn off access to create records in the pref table for all users except those with [full Access] priv set.
Create an account or sign in to comment