Jump to content

Array type structure - simple right?


r.m.c

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

Recommended Posts

Perusing over the FM Pro example of a Company with Members to create a relationship where multiple members can belong to each company, I thought my design would be similar.

I have one file which holds records for schools - school.fm5

(Name,Location,Type,Address,Phone,Fax)

I also need to keep track of which grades a school has and how many students in each grade.

I have a second file grade.fm5 which has (school-name,grade,count).

I related school.fm5 with grade.fm5 through school-name,

I have a working portal in the school.fm5 that correctly allowed creation of multiple grades and corresponding student counts. Great.

My little quandry is how to add a year field such that the school data remains the same except the student/grade numbers change each year.

The end result would be school.fm5 that could choose which year to view and then show grades and counts for the year chosen.

I'm thinking either relating the files through two match fields or creating a new file just with schoolname and year to relate with both grade.fm5 and school.fm5.. but I am unsure on implementation..

Any and all help appreciated.

Rich crazy.gif" border="0

Link to comment
Share on other sites

That kind of question pops up a lot here (including one from myself at one point wink.gif" border="0 )

Most common answer is to create a new calculation field that will be a combination of School Name and Year. Use this new field as the match field and it should work the way you want.

Link to comment
Share on other sites

Thank You. smile.gif" border="0

Worked like a charm and I think I am beginning to understand how portals and relations work. They seem to have a broader range of very simple to very complex and I thought they were all complex B)-)

Now on to a new question...which is hopefully just an extension of my previous question.

Following on the example of companies and employees..I am building a database to have both a contact list and a company list. Not all contacts have associated companies but some companies have more than one contact. This all work nicely as long as I have a predefinied list of companies to relate to.

But I want to allow the entry of a company name for any contact. So a related company record is created whenever a new company name is placed in the company field. And then I can always go to a 'company' layout to add company specific data as well as seeing who is from the same company.

So this is almost exactly the same as the FM Pro example except the company names are entered on the fly so to speak.

Any and all help appreciated.

Rich

Link to comment
Share on other sites

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