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

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

Recommended Posts

Posted

Hi,

I have a database which records transactions against companies. On the companies Layout I have a button to add an employee which takes the user to the employee Layout. The problem I have is that each employee is allocated to a company and once on the employee screen the user has to select which company the employee belongs too. What I want to do is automate the process e.g. the user clicks on 'Add Employee' in the Company Layout and Filemaker recognises what company (or record) the user is currently looking at and automatically selects this company in the Employee Layout. This saves the user time searching for the company in the list.

If anyone knows a way I can do this I would be very grateful.

Thanks.

Darren.

Posted

Assuming that you have a table for companies;one for employees; and a join table.

In the relationship graph link your unique company ID key field with a company ID field in the join table; link your unique employee ID key field with an employee ID field in the join table.

Have a script attached to your "Add new employee" button on the company layout that:

pseudo code:

Set variable $company with value of company ID key field

Goto employees layout

New record

Set variable $employee with value of employee ID key field

Goto layout for join table

New record

Set field company ID field with variable $company

Set field employee ID field with variable $employee

Goto employees layout

(if there is the company name field from your company table on this layout it will show the company name for this new employee). Employee details can then be entered

This topic is 5443 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.