Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How do I use a global field to store a field property?

Posted on 2007-10-01
15
Medium Priority
?
346 Views
Last Modified: 2010-04-27
I'm sure I haven't used the correct terminology in my question, but I have recently been introduced to the global field within filemaker pro as the 'query' substitute for access. But I'm having trouble trying to understand how it works. To describe:

I have a supplier who supplies a changing source of seasonal vegetables. I have created a suppliers table which holds all the relevant suppliers details and also a produce table which stores the details for each vegetable these suppliers supply. In this produce table there is a produce id, a produce name, a unit cost (often changing and in need of updating) and a list value (yes or no) that states whether a vegetable is in season or not.

What I want is to be able to see within the suppliers record a list of vegetables they provide that are in season, and another list of vegetables they supply that are not yet in season. When a vegetable then becomes in season I want to be able to click a button labelled 'in season' and the vegetable then populates the 'in season vegetable list'. Likewise when a vegetable moves out of season, I want to press a button labelled 'out of season' and the vegetable populates the 'out of season vegetable list'.

These lists I want to view as tabs within the suppliers record.

I have previously been shown a method of doing something very similar using the global field within filemaker but though I have tried to emulate it as a solution to this problem I simply can't get it to work! Is there anyone who can help...(Lesouef you out there?)
0
Comment
Question by:butterhook
  • 8
  • 6
15 Comments
 
LVL 8

Expert Comment

by:Bradley Haynes
ID: 19994671
Why not write a Proc that test for the date and list items using "if" and the Date functions in FileMaker Pro
0
 
LVL 28

Expert Comment

by:lesouef
ID: 19995413
yes, I am around, busy outside most of the day at the moment.
the example I gave you is exactly that. it's a bit late today (actually rather soon too-morrow!) to think properly, but I think by just renaming fields in my existing example, it should be clear enough.
can you remind me the name of the file I posted for you? Can remember it...
0
 
LVL 1

Author Comment

by:butterhook
ID: 19996842
Morning all!

Lesouef, the name of the file you posted was 'orders'
And b Haynes, what is a Proc?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

Expert Comment

by:lesouef
ID: 19996866
I guess procedure = method = script in the filemaker world
0
 
LVL 28

Expert Comment

by:lesouef
ID: 19996909
ok, new example adapted slightly with the veegees
https://filedb.experts-exchange.com/incoming/ee-stuff/4881-orders.zip
0
 
LVL 1

Author Comment

by:butterhook
ID: 19997055
Again, perfect Lesouef. The only problem I'm having now is adding this to my existing database. It doesn't seem to work after I rename the tables/files to correspond with suppliers and produce in the main database... what would be great is step by step adding exactly what you've done to my existing database. This way I can begin to understand exactly how these globals work, so that next time I don't have to bore you with the same question. Instead I can ask a different question (because there's loads of them!)

Is it possible to do this step by step? I'll do the first couple of steps:

1. Create a suppliers and produce table with the relevant fields within - DONE
2. Create relationships between these two tables - DONE (assuming it's exactly the same principle as before)

This is where I need you to take over:

3. ???

I've upped the point value to 500.

Cheers Lesouef
0
 
LVL 28

Expert Comment

by:lesouef
ID: 19997221
- create the startup script (or append to the existing one) to define the global fields when opening the files. (does not matter in local usage since they are saved, but in a multi-user environment on a server, they must be defined)
- create the new-order script or append to yours?
- create the script to alter the status, assign to the button in the in season portal.

and if all this fails, give a copy of yr file if not confidential.

I'll won't follow up this afternoon, I'll be offline.
0
 
LVL 1

Author Comment

by:butterhook
ID: 19999045
Lesouef, I have done as you said, and it doesn't seem to work. Please have a look at this https://filedb.experts-exchange.com/incoming/ee-stuff/4889-Work-in-progress.zip then let me know where I went wrong...
0
 
LVL 28

Accepted Solution

by:
lesouef earned 2000 total points
ID: 20000711
no you did not! where is the startup script defining the global fields?
see yr file modified:
https://filedb.experts-exchange.com/incoming/ee-stuff/4892-Work-in-progress_returned.zip

I am afraid we'll have to speak about Joan of Arc again! unless this is can arranged at the next corner's pub...
0
 
LVL 1

Author Comment

by:butterhook
ID: 20001204
I assumed seeing as though the database is stored locally and not for multi-users on a server, that I didn't have to define the globals... as you can see I'm really not clued into this global field psyche! I can't seem to understand it: access queries have a logic I;m able to understand. But I can't yet get my head around the global! Anyway, thanks again Lesouef! Was it just the globals that I failed to do properly?

How come there was no start up script for the customers and orders you originally did?
0
 
LVL 28

Expert Comment

by:lesouef
ID: 20002234
because I entered them manually, and as the file was local, it was stored.
in the second file, I thought it was better to use it the way you should do for shared files, but if you're sure it will never be on a server, you can define them once manually and forget about them. still safer to do it as the 2nd file as you never know how the file will be used in a 3 years time.
As for the globals, I know too few things about access to compare; I think you would not need such a trick in Access, since you can associate a query result to a layout. what else can I say? a global field is a field of which the value is common to all fields. it works like a global variable in javascript or php, but is stored in a field.
0
 
LVL 1

Author Comment

by:butterhook
ID: 20002330
Well, once again, it's been a pleasure to work with you Lesouef. Perhaps next time we talk, I will have a better understanding of globals! Until then...
0
 
LVL 28

Expert Comment

by:lesouef
ID: 20002425
outside this topic, what's the reason for such a pseudo, butterhook?
0
 
LVL 1

Author Comment

by:butterhook
ID: 20005012
Live and let Die: more specifically it is Julius W. Harris as Kanangas gleeful giant henchman Tee Hee, who uses a hook for a hand, with often deadly results. In a memorable scene he has Bond locked into a chair and threatens to snip off 007s fingers. When he fumbles a bit, Moore gets off one of his better wisecracks by muttering "butterhook".
0
 
LVL 28

Expert Comment

by:lesouef
ID: 20009313
thanks for culture minute!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

572 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