Re: Button Script




<JamesStep@xxxxxxxxx> schreef in bericht
news:1190491348.479789.223570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm new to FileMaker and this group, and hope it's okay to post a
beginner's question.

I run a small consulting business and am setting up a database to keep
track of our jobs. I've gotten most of it set up, but am a little
stumped on how to script one button.

We typically have 5 to 10 jobs active at a time, so I'd like to put a
popup button on the layout that, when clicked, displays a list of
active jobs and lets me jump directly to any of them. (An active job
would be any job in which the "Job Completed" checkbox is not
checked.)

I have version 9.0. Any help would be appreciated.

James


I think a relationship might come in handy.
Create one new field
REL < text , Auto-enter value , "Active">
Create a second new field, a calculation
cActive < text , IF ( MyField <> "Job Completed" ; "Active" ; "" ) >
Create a relation between REL and cActive, I call the TableOccurence
<ActiveJobs>
Create a ne layout for the ActiveJobs TableOccurance
On this layout create a portal
Put one field in the first row, best is a job title or job desciption.
UNcheck the fieldcontrol > Behavior > Allow field to be entered in browse
mode.
Give the portal as many rows as you need. (Maximum number of jobs that are
active OR just set it to five and activate the scroll bar)
When you are now in browse mode you will see all current active jobs.
Now go into scripts and create a script <GoTo Rel>
it holds only one script step. Goto related record.
Under Specify you select the ActiveJobs TableOccurence
And under layout you the layout where you normaly work from. The one that
holds the Job details.
Now go back into layout mode and select the field that is inside the portal
right click and select Button setup > In the left column select Perform
Script and under Specify selct the GoTo Rel script.
Now when you are working and you want to see which jobs are currently active
you just go to the ActiveJobs layout. then if you want to go to any of them
you just have to click on the correct portal row and it will take you to
that record and layout.

All this completely untested, but you should get a long way.

Keep well, Ursus


.


Quantcast