Solved

is it possible to set a database global

Posted on 2006-06-13
13
291 Views
Last Modified: 2010-04-27
is it possible in filemaker pro8 to set a global value that can be seen no matter what layout you are in???
0
Comment
Question by:kauakea
  • 6
  • 5
  • 2
13 Comments
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 200 total points
ID: 16900567
yes, just place the table:field in any layout. if the field is global, it will be always true whatever record is active, so you don't even need a relationship in between the table containing the global field and the table linked to the layout.
0
 
LVL 19

Accepted Solution

by:
billmercer earned 300 total points
ID: 16904322
One warning about global fields. If you're connecting to a remotely hosted database (not opening it directly yourself) then the value of a global field is not preserved when you exit the application. Each time you open the file, the gloaIt gets reset back to whatever the value was when the file was last opened locally. This can be confusing if you don't understand it.

(For what it's worth, you can also create a global script variable by using two $ in front of the name instead of one.)

0
 

Author Comment

by:kauakea
ID: 16904864
would using a global script variable be safer?? i do have multiple users. i am using fm8 in share mode.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 28

Expert Comment

by:lesouef
ID: 16904956
it's the same, you have to define its value at startup. it just that it does not waste a field, but you can't place it in a layout, so you'll have to use a global field for this anyway. if you're to keep a lot of parameters this way, and users may need to alter them, you'd better use a table for parameters and make a loop through all its records at startup to define the variables.
0
 

Author Comment

by:kauakea
ID: 16905021
i have 3 tables. when i create a record in one table i want to use a custom dialog to get the primary field and then setting a global value and then use the set command to create new records in the other 2 tables via etting the primary field in the other 2 tables with the global value.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 16905063
so, why do you use a custom dialog? to confirm records creation?
are these tables related? if yes, just enable records creation though the relationship and create a new line in a portal for instance.
if not, just create a nex record in 1st table, save the ID as $id for instance, goto 2nd table/layout, new record, set field 2ndtable::id=$id, etc...
no need for questions or defining any startup value.
am I missing something?
0
 

Author Comment

by:kauakea
ID: 16905130
how would i get the  new primary field value  that i need to create the new records in the other 2 tables if not via a custom dialog?
0
 
LVL 19

Expert Comment

by:billmercer
ID: 16905980
>how would i get the  new primary field value  that i need to create the new records in the other 2 tables if not via a custom dialog?
Really you should use a serial number or an auto-enter field for the primary key. The database key shouldn't be something that users can create or modify, and it shouldn't depend on information in the database itself, such as names, phone numbers, etc.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 16906851
define a variable with the new primary field value once the 1st record is created, then use it to define new records IDs in other tables.
need an example?
0
 

Author Comment

by:kauakea
ID: 16906872
an example would be excellent... thanks
0
 
LVL 28

Expert Comment

by:lesouef
ID: 16906993
http://www.lesouef.net/files/new_rec.fp7
rough example, see the unique script to create records in 3 unlinked tables with the same ID
0
 

Author Comment

by:kauakea
ID: 16907008
thanks lesouef, that works for me
0
 
LVL 28

Expert Comment

by:lesouef
ID: 16907038
ok
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sync a Wordpress with Filemaker 9 523
FM GO Web Viewers 1 204
Filemaker Pro 14 Advanced - Runtime Kiosk to FMpro Server 14 4 281
url for a container field 1 388
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question