November 30, 200619 yr I am new to Filemaker and need some assistance. This is what I would like to have in my database. I sell classified ads and the minium word count is 20 for $30. I would like to be able to automatically calculate what it would be if someone had an ad that was 25 words. Help me out with what I have done or with something simplier...THANKS! I have created a field where I input the word count and then another field that lists the words over 20, then another field that will multiple the words over 20 by $1.50 and then add it to the $30 giving a total for the ad. However, some of the ads are less than 20 words and it creates a negative number. Anyway I can fix this or am I wanting too much? THANKS for helping!!
November 30, 200619 yr Author I am a newbie with FM, so...do I post it exactly like you said 1.5 * Max ( 20 ; WordCount ( text ) ) or do I put the field name I have for the word count where you have WordCount? sorry, but thanks for all of your help.
November 30, 200619 yr WordCount ( text ) Paste Comment's calc into your calc box then highlight only the word text (or double-click it). Then (from your dropdown of fields), find your field which holds the entire ad text and double-click it. It will replace text with your true field name as: WordCount ( yourAdField ) You can then eliminate those excess fields you created (to hold the word count, count over 20 etc.) because this one calc will handle it all. LaRetta :wink2:
November 30, 200619 yr What LaRetta said - unless counting the words in an ad differs from Filemaker's WordCount() function. BTW, it's not a good practice to store prices in a calculation formula. If your prices change, your entire history gets messed up. Better make price a number field that looks up the current price when the record is created. The same logic, to a lesser extent, applies to the minimum words requirement. That too can change. So your calc should really be: PricePerWord * Max ( MinWords ; WordCount ( text ) ) Edited November 30, 200619 yr by Guest
Create an account or sign in to comment