![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
FM8.5 I want to create a calculation result with a parameter , Create Date is more recent than September 29, 2010. Would this be Create_Date 29/09/2010? My calculation is: Account_Date_Create > 29/9/2010 and CONTACTS::CountryCompany = "Canada" and CONTACTS::StateCompany = "AB" or "Alberta"; Net * .05 Do you see any problems. Currently this calc is not discriminating against Create Dates earlier than Sept 29. Thanks |
)
#3
| |||
| |||
|
|
In article 3dde5ad1-bb3c-4220-8e0f-0ebcfdd92... (AT) 37g2000prx (DOT) googlegroups.com>, Buckbuck <buck.matthe... (AT) yahoo (DOT) com> wrote: FM8.5 I want to create a calculation result with a parameter , Create Date is more recent than September 29, 2010. Would this be Create_Date 29/09/2010? My calculation is: Account_Date_Create > 29/9/2010 and CONTACTS::CountryCompany = "Canada" and CONTACTS::StateCompany = "AB" or "Alberta"; Net * .05 Do you see any problems. Currently this calc is not discriminating against Create Dates earlier than Sept 29. Thanks There's two problems here. Firstly, when performing multiple tests in an If or Case statment you MUST put brackets / parentheses around each individual test to ensure that they are performed as you want them to be. Secondly you've got an extra "or "Alberta"" which makes no sense by itself - there should always be a Field name. I'm guessing that's meant to test if the StateCompany Field contains the data "AB" or the data "Alberta". This means you calculatio, which performs three tests (one of which combines two sub-tests) should really be written as: Â* Â* Â* Â*(Account_Date_Create > 29/9/2010) Â* Â*and (CONTACTS::CountryCompany = "Canada") Â* Â*and ((CONTACTS::StateCompany = "AB") or (CONTACTS::StateCompany = "Alberta")); Â* Â* Net * .05 They don't have to be on separate lines, but it does make it easier to see where the separate test are. Helpful Harry Â* ) |
#4
| |||
| |||
|
|
Based on your help I created this series of tests. But it did not work.. Can anyone see why Case ( (Account_Date_Create > 29/9/2010) and (CONTACTS::CountryCompany = "Canada") and ((CONTACTS::StateCompany = "AB") or (CONTACTS::StateCompany = "Alberta")) ;.05; (Account_Date_Create > 29/9/2010) and (CONTACTS::CountryCompany = "Canada") and ((CONTACTS::StateCompany = "BC") or (CONTACTS::StateCompany = "British Columbia")) and (Submit taxes ? "No") ;.12; (Account_Date_Create > 29/9/2010) and (CONTACTS::CountryCompany = "Canada") and ((CONTACTS::StateCompany = "NS") or (CONTACTS::StateCompany = "Nova Scotia")) ;.05; (Account_Date_Create > 29/9/2010) and (CONTACTS::CountryCompany = "Canada") and ((CONTACTS::StateCompany = "MB") or (CONTACTS::StateCompany = "Manitoba")) ;.05; (Account_Date_Create > 29/9/2010) and (CONTACTS::CountryCompany = "Canada") and ((CONTACTS::StateCompany = "ON") or (CONTACTS::StateCompany = "Ontario")) ;.05 ; (Account_Date_Create > 29/9/2010) and (CONTACTS::CountryCompany = "Canada") and ((CONTACTS::StateCompany = "QB") or (CONTACTS::StateCompany = "Quebec")) ; .05 ; (Account_Date_Create > 29/9/2010) and (CONTACTS::CountryCompany = "Canada") and ((CONTACTS::StateCompany = "SA") or (CONTACTS::StateCompany = "Saskatchewan")) ; .05 ; (Account_Date_Create > 29/9/2010) and (CONTACTS::CountryCompany ? "Canada") and (CountryCompany_s = "Canada") ; .05 ; 0 ) |
)![]() |
| Thread Tools | |
| Display Modes | |
| |