Hi Every one,
Please I need your help.
I want to create new element but this element process one time every tow month (month YES another No),
So how can I created ? I try to create with skip rule to check if the element processed last month then skip, But I didn't found any database item to check.
Can you help me ?
Element with skip rule ?
-
- Posts: 258
- Joined: Sun Oct 12, 2008 1:50 pm
- Location: Saudi Arabia
- Contact:
Dear Rawaf,
Follow the following steps:
1) Create a skip rule formula
2) Associate the skip rule to the Element Definition
Notice that there is no flag for processing every two months. but you can make use of the following code, you need two database items (PAY_PROC_PERIOD_END_DATE and EMP_HIRE_DATE).
processed = mod(trunc(months_between(PAY_PROC_PERIOD_END_DATE, EMP_HIRE_DATE)), 2)
if processed = 0 then
SKIP_FLAG = 'Y'
ELSE IF processed = 1 then
SKIP_FLAG = 'N'
--> This will make the element processed in one month and skipped in another starting from employee Hire Date
Regards,
Follow the following steps:
1) Create a skip rule formula
2) Associate the skip rule to the Element Definition
Notice that there is no flag for processing every two months. but you can make use of the following code, you need two database items (PAY_PROC_PERIOD_END_DATE and EMP_HIRE_DATE).
processed = mod(trunc(months_between(PAY_PROC_PERIOD_END_DATE, EMP_HIRE_DATE)), 2)
if processed = 0 then
SKIP_FLAG = 'Y'
ELSE IF processed = 1 then
SKIP_FLAG = 'N'
--> This will make the element processed in one month and skipped in another starting from employee Hire Date
Regards,
<b>Thank you Eng_ahmad_2007 [:)]</b>
Problem solved. and I will write The formula of skip role if any one need it:
==========================================
==========================================
/* Defaults Section */
default for SKIP_FLAG IS 'N'
Default For PAY_PROC_PERIOD_END_DATE is '4712/12/31 00:00:00'(date)
Default For EMP_HIRE_DATE is '0001/01/01 00:00:00'(date)
/* Formula Body */
processed = mod(trunc(months_between(PAY_PROC_PERIOD_END_DATE, EMP_HIRE_DATE)), 2)
if processed = 1 then
SKIP_FLAG = 'Y'
ELSE IF processed = 0 then
SKIP_FLAG = 'N'
RETURN SKIP_FLAG
==========================================
==========================================
Problem solved. and I will write The formula of skip role if any one need it:
==========================================
==========================================
/* Defaults Section */
default for SKIP_FLAG IS 'N'
Default For PAY_PROC_PERIOD_END_DATE is '4712/12/31 00:00:00'(date)
Default For EMP_HIRE_DATE is '0001/01/01 00:00:00'(date)
/* Formula Body */
processed = mod(trunc(months_between(PAY_PROC_PERIOD_END_DATE, EMP_HIRE_DATE)), 2)
if processed = 1 then
SKIP_FLAG = 'Y'
ELSE IF processed = 0 then
SKIP_FLAG = 'N'
RETURN SKIP_FLAG
==========================================
==========================================
-
- Posts: 258
- Joined: Sun Oct 12, 2008 1:50 pm
- Location: Saudi Arabia
- Contact:
Who is online
Users browsing this forum: Semrush [Bot] and 0 guests