cul8ter Posted February 28, 2007 Posted February 28, 2007 I am attempting to come up with a calculation that allows a field to automatically be inserted with a number when another field is filled in, example would be a number amount that is put in to a field lets say 1,000 and what i would like to have happen is the next field would automatically be filled in with the appropriate number lets say if you insert a number between 200-1000 "it would vary between that number" the second field would need to say 5 as an example, i have played around with this for a while but cannot get it. any ideas would be greatley appreciated. Thanks
LaRetta Posted February 28, 2007 Posted February 28, 2007 (edited) if you insert a number between 200-1000 "it would vary between that number" the second field would need to say 5 Yes. Your second field would be an Auto-Enter (Replace) calculation. This means that it will perform the math on the first field whenever the first field meets the criteria specified in Field2's calculation. Field1 contains 100 Example1 (mathematics): You want Field2 to become 2 1/2 percent of that. So Field2 would be standard number. Select Options. Insert the following: [color:green]Field1 * .025 It will default as a number result. At the bottom also, LEAVE CHECKED "Do not Evaluate if all referenced Fields are empty." Then say OK to exit calc dialog. Now, back at Auto-Enter tab, UNCHECK box which says, "Do Not Replace Existing Value for Field, if any." If Field1 is blank, nothing will appear in Field2 (because it is the ONLY field and you left checked, "Do not evaluate if all referenced fields are empty." But if a User inserts (or changes) a value into Field1, Field2 will compute the correct number (because you have unchecked "Do not Replace Existing Value." Example2 (Case statement): If Field1 is less than 200, it should be blank. Field1 values between 200 and 1000 should produce 5 in Field2. Field1 values 1000 and 5000 should produce 10 in Field2. If Field1 is over 5000, it should be 20. [color:green]If ( Field1 :great: 200 ; Case ( Field1 < 1000 ; 5 ; Field1 < 5000 ; 10 ; 20 ) ) Read up in FM Help on specific examples using Case(). Does that help? If you need assistance with the specific formula, let us know what it is and we'll help you with it. LaRetta Edited February 28, 2007 by Guest Added second example
Vaughan Posted February 28, 2007 Posted February 28, 2007 Unless this second number needs to be manually overwritten, use a straight calculation field instead of an auto-entered field. The exact same expression should work for the calc.
cul8ter Posted February 28, 2007 Author Posted February 28, 2007 Thank you Laretta I will give it a try and let you know how it worked out.
cul8ter Posted March 13, 2007 Author Posted March 13, 2007 I need to be more clear. I create a new record, and in field 1, i input a number between $200 to $1,000. when i click off the screen i need the number 17 to pop up in the second field.also an amount between $1,001 to $3,000 to input 9 in the second field. and 3,001 through 6,000 in the first field to have 6 pop up in the second field, you get the Idea. this needs to be a calculation but i cannot get my attempts to work, any Ideas? Thank you
Raybaudi Posted March 13, 2007 Posted March 13, 2007 Case ( Field1 ≥ 200 ; Case ( Field1 ≤ 1000 ; 17 ; Field1 ≤ 3000 ; 9 ; Field1 ≤ 6000 ; 6 ) )
cul8ter Posted March 13, 2007 Author Posted March 13, 2007 It worked, thank you so much, I have another one for you now that issue is resolved. In field 1 i input $1,000. and in field 3 i need for the interest rate of that field to equal a percentage of what is in Field 1 IE; 1,000 times 16% equals 160. or it could be 3,000 in field 1 and 8% of Field 1 or any variations of numbers because there not all the same. any ideas?
cul8ter Posted March 18, 2007 Author Posted March 18, 2007 Calculation within a newly created record. In field 1 i input $1,000. and in field 2 i need for the interest rate of that field to equal a percentage of what is in Field 1 IE; 1,000 times 16% equals 160. or it could be 3,000 in field 1 and 8% of Field 1 or any variations of numbers because there not all the same. any ideas?
Recommended Posts
This topic is 6521 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