scottvaughan Posted April 10, 2006 Share Posted April 10, 2006 I need to calculate a number. The calc is from 2 fields The first is a coded number of 3000/1500. The 2nd is 5. So the calc for this example would be 4(3000)+1(1500) for a total of 13,500. How do I get Filemaker to recognize the 2 different numbers? Can I tell it to see one on the left of the slash and then see the one on the right? Link to comment Share on other sites More sharing options...
-Queue- Posted April 10, 2006 Share Posted April 10, 2006 If the first field is a text field, then LeftWords( field1, 1 ) and RightWords( field1, 1 ) will give you the two numbers. But where does the 5 come into play? Link to comment Share on other sites More sharing options...
scottvaughan Posted April 10, 2006 Author Share Posted April 10, 2006 The 5 is an order quantity. the customer needs [email protected] and 1 @ 1500, but the orders always change but the format almost never does. I can easily change the / to something else. Link to comment Share on other sites More sharing options...
scottvaughan Posted April 10, 2006 Author Share Posted April 10, 2006 Sorry, The field is a number Link to comment Share on other sites More sharing options...
-Queue- Posted April 10, 2006 Share Posted April 10, 2006 Well, it should be a text field; the slash will be ignored in a number field. A number field should only be used for a single number. So that 5 is split into 4 and 1? How do you know in what way it should be split? Link to comment Share on other sites More sharing options...
scottvaughan Posted April 10, 2006 Author Share Posted April 10, 2006 All of the numbers change depending on the job. The 5 could be anything, but the full order is always 1 less than the number. So if it were 15, it would be 14(3000) + 1(1500). The 3000 and 1500 can change as well. The clac needs to get the total order and i want to try and keep it in the same field. Link to comment Share on other sites More sharing options...
-Queue- Posted April 10, 2006 Share Posted April 10, 2006 Okay, change field1 (with the two numbers) to a text field and then use Case( field2, (field2 - 1) * LeftWords( field1, 1 ) + RightWords( field1, 1 ) ) Of course, ideally each number would be placed in its own field, making things much simpler. Link to comment Share on other sites More sharing options...
scottvaughan Posted April 12, 2006 Author Share Posted April 12, 2006 Thanks, worked like a charm Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5962 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