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

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?)
LVL 1
butterhookAsked:
Who is Participating?
 
lesouefCommented:
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
 
Bradley HaynesCommented:
Why not write a Proc that test for the date and list items using "if" and the Date functions in FileMaker Pro
0
 
lesouefCommented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
butterhookAuthor Commented:
Morning all!

Lesouef, the name of the file you posted was 'orders'
And b Haynes, what is a Proc?
0
 
lesouefCommented:
I guess procedure = method = script in the filemaker world
0
 
lesouefCommented:
ok, new example adapted slightly with the veegees
https://filedb.experts-exchange.com/incoming/ee-stuff/4881-orders.zip
0
 
butterhookAuthor Commented:
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
 
lesouefCommented:
- 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
 
butterhookAuthor Commented:
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
 
butterhookAuthor Commented:
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
 
lesouefCommented:
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
 
butterhookAuthor Commented:
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
 
lesouefCommented:
outside this topic, what's the reason for such a pseudo, butterhook?
0
 
butterhookAuthor Commented:
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
 
lesouefCommented:
thanks for culture minute!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.