Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8134 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Greetings FM Gurus...I bow to your magnificence!

Well as you can see I am a mere acolyte in the FileMaker universe, I come from an ancient race known as Clipper developers so I know about databases, but the paradigm of using Filemaker is kicking my priestly butt. So here is a question I pose to you.

Scenario: 2 tables, a main and a related

SYSTEM db --- related to ---> SECTOR db

I have successfully created a form with fields from the main db (SYSTEMS) and a portal to a single related table (SECTORS). This form is used to enter data for the Systems db and also the Sector db via the portal, simple enough. As the data grew I decided to create a field on the screen that uses a value list, extrapolated from the System db, that shows the names of each System. I did this using a global variable. What would be great is whenever I select a new value in that pop-up list, I want the record pointer to move to that record. This is where I am hung up, since my paltry skills in FM are sadly limited. Do I do this with a button and script or use a FIND somehow (something I have avoided thus far), or do I pray that FM Gnomes will code it for me whilst I snooze in the night? With your wise guidance I know I can truly become powerful in FM!

All respect,

Acolyte Richard

[email protected]

Posted

Hello Richard,

If I understand you correctly, what you want to do is certainly achievable. There is some scope for confusion, however, as terms such as 'global variable' and 'record pointer' are not part of the FileMaker vocabulary. I assume that you mean that you have defined a value list and applied it to a global field as a pop-up list or menu?

If that is the case, you now need a script which is coded as follows (NB: for the purposes of this example, I've assumed your global field is called 'gSystemList', and it is based on values in a field called 'SystemID'):

Allow User Abort [off]

Set Error Capture [On]

Go to Field [select/Perform, "gSystemList"]

Loop

Exit Loop If ["gSystemList > "a""]

Pause/Resume Script ["00:00:01"]

End Loop

Exit Record/Request

Show All Records

Go to Record/Request/Page [First]

Loop

Exit Loop If ["SystemID = gSystemList"]

Go to Record/Request/Page [Exit after last, Next]

End Loop


Now, to make the process active, go to layout mode, select the 'gSystemList' field, call up the "Field Format" dialog and disable the "Allow entry into field" option. Then (with 'gSystemList' still selected) go to 'Specify Button', choose 'Perform Script' and attach the script outlined above.

Now when you click on the 'gSystemList' field, the pop-up list should appear, and when you click on an item on the list, the database should rapidly take you to the first record which matches the value you clicked on.

Hope this is of some help?! smile.gif

This topic is 8134 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.