Dufek Posted April 8, 2005 Share Posted April 8, 2005 Is there a way to ignore certain numbers in a calculation? Example... I have two fields: Product and Quantity. I have a simple price in the product field. The calculation I have to find the totals is Product*Quantity. The only problem is the one product I have is 4x4 gauze for $1.00. The calculation takes 4*4*1.00 resulting 16. Can anyone help me in telling me a way to have the calculation ignore the "4x4" without have to "four by four" in the field? I know I can make seperate fields for price and such but I am trying to avoid this as the product field gets data from other fields & I would have to re-do much of the database. Link to comment Share on other sites More sharing options...
Ender Posted April 9, 2005 Share Posted April 9, 2005 I should think it would be worth redoing this part of your database. Separate fields are the way to go. You can automate the extraction of the price with a Replace using a calc like this: Right(Product; Length(Product)-Position(Product;"$";1;1)) This assumes that every Product has a price with a "$". Link to comment Share on other sites More sharing options...
Dufek Posted April 9, 2005 Author Share Posted April 9, 2005 Thank you Ender for your suggestion. I will make separate fields for the product and price. Link to comment Share on other sites More sharing options...
Dufek Posted April 9, 2005 Author Share Posted April 9, 2005 I cannot get the lookup field to work for the price. I have a relationship in the two tables using product id. When I select the product from the drop down box, I would like the price to show up, but it doesn't... Any ideas on what I am doing wrong?? Link to comment Share on other sites More sharing options...
FileMakin' Tom Posted April 9, 2005 Share Posted April 9, 2005 Case(ProductSize = "4x4", 1.00, ProductSize = "4x5", 1.50, etc., etc. The only problem with this is that one must have define fields privileges to changes prices. But this will create an automatic price variation based on the product size (or name) if you wish. You might like to look at my "Basic Inventory Relationship" files to see how products and prices can be looked up. I have attached it to this post. Tom Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.