Jump to content
Server Maintenance This Week. ×

Relationships with Multiple Fields


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

Recommended Posts

  • Newbies

I have been working with FileMaker redesigning a database for my work, and I have run into a problem time and time again. When working with other databases (such as MySQL), I often want to run a query something like this: [color:"blue"]"SELECT * FROM jobs WHERE job_number='1' AND client_id='7'". I have tried to get this [color:"red"]AND part into my FM databases, but I'm having trouble.

Is there a way to relate two files using more than one related field? For example, I had a file called "materials" which has a radio button with the options "Duty Free" and "Non Duty Free". It would be nice to be able to pull up a report that lists all items which are "Duty Free", all the "Non Duty Free" items, and display totals for each with the $ amount of duty and the final total of everything. But I couldn't find a way to make a relationship that would show the items which had the correct job number [color:"red"]AND duty/non duty.

The best solution I have found so far is to separate everthing into different files. So now I have two files instead for the Duty and Non Duty items.

Does anyone know of a better way? Thanks!

Link to comment
Share on other sites

  • Newbies

The only real difference is that the Duty items have a 15% markup on the total. Other than that, they are the same.

The idea of combining fields with a calculation is interesting... but it feels like a workaround. A lot of things have felt that way when I have been reading this forum. There is a way to do most everything, but it just might not be easy or straightforward.

Link to comment
Share on other sites

Workaround !!!

It's the natural way to answer your first "litteral" querry :

"SELECT * FROM jobs WHERE job_number='1' AND client_id='7'"

job number = 1 and client id =7 ----> 1&"-"&7

It surely isn't a workaround. You could turn around the problem for century else way. wink.gif

Yur Duty/Not Duty issue could be solved within the same file, using a Multikey, for example

job N

Link to comment
Share on other sites

BlackWolf said:

The only real difference is that the Duty items have a 15% markup on the total. Other than that, they are the same.

The idea of combining fields with a calculation is interesting... but it feels like a workaround. A lot of things have felt that way when I have been reading this forum. There is a way to do most everything, but it just might not be easy or straightforward.

That is still job for single database. Just mark items and base calculation on that.

Link to comment
Share on other sites

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