on 09-26-2017 6:42 PM
Hi All ,
I am looking for a validation in Information steward which checks teh material is used or not..
Scenario :- From MARA table we want to check how many materials are not updated from past 6 months after creation..We are considering Create date and Last update date.Date format when checked in View is YYYYMMDD
But i am getting below error
The return statement is expected to return a conditional value : found type <INT>
Below is my expression
BEGIN RETURN date_diff($lastupdatedate, $createdate, 'MM'); END
I have defined parameter in datetime format ..
Could someone please help me out
Hi Nitin,
a validation rule in Information Steward requires always a conditional value (TRUE or FALSE) as return value.
In your example you would return the number of month between the create date and last update date (= integer value).
To solve that just extend the rule expression to a complete condition, e.g.
BEGIN RETURN date_diff($createdate, $lastupdatedate, 'MM') < 6; END
Depending on the format and data type you have to convert the parameter values at first to a date value:
BEGIN RETURN date_diff(to_date($createdate, 'yyyymmdd'),to_date($lastupdatedate, 'yyyymmdd'), 'MM') < 6; END
Best regards
Marcus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.