Newbies BlackWolf Posted June 25, 2003 Newbies Posted June 25, 2003 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!
kennedy Posted June 26, 2003 Posted June 26, 2003 Create a calculation field that combines the two fields... you could concatenate them... or negate the job number if duty free... or however. Then make the relationship on that calculation.
Anatoli Posted June 26, 2003 Posted June 26, 2003 RE: So now I have two files instead for the Duty and Non Duty items How those db's differ? Isn't that only attribute?
Newbies BlackWolf Posted June 26, 2003 Author Newbies Posted June 26, 2003 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.
Ugo DI LUCA Posted June 26, 2003 Posted June 26, 2003 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. Yur Duty/Not Duty issue could be solved within the same file, using a Multikey, for example job N
Anatoli Posted June 26, 2003 Posted June 26, 2003 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.
Recommended Posts
This topic is 7889 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 accountSign in
Already have an account? Sign in here.
Sign In Now