cancel
Showing results for 
Search instead for 
Did you mean: 

Timeliness Quality Dimension - Information Steward

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

MarcusZwirner
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Answers (0)