Thanks in advance - We have two questions?
Q1) We would like to calculate a Contracts end date based on a fixed duration of (6,12 or 24) months
We have three three attribues. StartDate, EndDate (Both are MM/DD/YYYY, however EndDate is Calculated) and Contract_Duration (Number,6,12,24)
Q2) Months_Differece
based on the same attributes we wish to Calculate the Months Difference between the Start and End to use for other calculations
Thank you
MONTH Difference Calculation
tried
hej, we tried this
RULE:
Customer.ContractEndDate=MONTH_ADD(Customer.ContractStartDate+Customer.ContractDurationMonths)
With ERROR:
com.bas.shared.ruleparser.ParseException Unsupported function MONTH_ADD
The EndDate attribute is Calc, and same format as StartDate
The ContractDurationMonths is just a Number attribute with four choices 6,12,24,36
Hrm.... any ideas?
RULE:
Customer.ContractEndDate=MONTH_ADD(Customer.ContractStartDate+Customer.ContractDurationMonths)
With ERROR:
com.bas.shared.ruleparser.ParseException Unsupported function MONTH_ADD
The EndDate attribute is Calc, and same format as StartDate
The ContractDurationMonths is just a Number attribute with four choices 6,12,24,36
Hrm.... any ideas?
Re: MONTH Difference Calculation
If I want to create a new contract that starts from the beginning of a new financial year, I try apply the below:
Customer.ContractStartDate=MONTH_ADD(MONTH(Customer.FinancialYearEndDate)+FIRST_DAY_OF_NEXT_MONTH)
I get an error to say that 'FIRST_DAY_OF_NEXT_MONTH' does not exist, whether it is a business object rule or in a process action.
Customer.ContractStartDate=MONTH_ADD(MONTH(Customer.FinancialYearEndDate)+FIRST_DAY_OF_NEXT_MONTH)
I get an error to say that 'FIRST_DAY_OF_NEXT_MONTH' does not exist, whether it is a business object rule or in a process action.
AwareIM Developer edition. Version 8.5 (Build 2827) running on Windows Server 2012 R2 Standard
-
- Posts: 2413
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: MONTH Difference Calculation
Would this not work?yahya wrote:If I want to create a new contract that starts from the beginning of a new financial year, I try apply the below:
Customer.ContractStartDate=MONTH_ADD(MONTH(Customer.FinancialYearEndDate)+FIRST_DAY_OF_NEXT_MONTH)
I get an error to say that 'FIRST_DAY_OF_NEXT_MONTH' does not exist, whether it is a business object rule or in a process action.
Customer.ContractStartDate=DATE_ADD(Customer.FinancialYearEndDate,1)
If FinancialYearEndDate = June 30 2020
The ContractStartDate = July 1 2020
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 1462
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: MONTH Difference Calculation
FIRST_DAY_OF_NEXT_MONTH requires parameters.yahya wrote:If I want to create a new contract that starts from the beginning of a new financial year, I try apply the below:
Customer.ContractStartDate=MONTH_ADD(MONTH(Customer.FinancialYearEndDate)+FIRST_DAY_OF_NEXT_MONTH)
I get an error to say that 'FIRST_DAY_OF_NEXT_MONTH' does not exist, whether it is a business object rule or in a process action.
From manual IF FIRST_DAY_OF_PREV_MONTH (Account.OpeningDate=01/09/2004) Then ...
Re: MONTH Difference Calculation
Thanks Mark,eagles9999 wrote: Would this not work?
Customer.ContractStartDate=DATE_ADD(Customer.FinancialYearEndDate,1)
If FinancialYearEndDate = June 30 2020
The ContractStartDate = July 1 2020
That would work, my next dilemma is how do I continue when 2020 is over and we in 2021, I could possibly run a scheduled process that updates the FinancialYearEndDate.
AwareIM Developer edition. Version 8.5 (Build 2827) running on Windows Server 2012 R2 Standard
-
- Posts: 2413
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: MONTH Difference Calculation
Hi Yahya,
Please PM me or send me an email to [email protected] or [email protected].
Would need to understand a bit more context of what you are wanting to do.
Please PM me or send me an email to [email protected] or [email protected].
Would need to understand a bit more context of what you are wanting to do.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....