0 Replies Latest reply on Jul 8, 2020 1:17 PM by 4045529

    Evaluating NULL values in Fast Formulas

    4045529

      Hello everyone,

       

      Kindly help on this.

       

      I'm getting the below error from the Fast Formula. This FF is being called from another FF. I have given the codes below. I want to check if the str_Dates variable is NULL. This variable can hold a null value. So I'm checking IF ISNULL(str_Dates) = 'N'. It's throwing error at this line only. Kindly let me know how to evaluate NULL value in the IF statement.Vinod Gowda-MichaMy Oracle Support Community

       

      Formula XX_YYYY_CURRENT_VALUE_START_DT_FF, line 5, a local variable was used before being initialized.  Details: Assign a value to local variable STR_DATES before it's referenced.

       

      XX_YYYY_CURRENT_VALUE_START_DT_FF fast formula is as below:

       

      INPUTS ARE str_Dates(TEXT),

      str_Assignment_ID(TEXT),

      str_EFFECTIVE_DATE(DATE)

       

      IF ISNULL(str_Dates) = 'N' THEN

      (

      l_Status_Start_Date = GET_VALUE_SET('xx_yyyy_STATUS_MIN_ST_DT_VS','|=P_ASG_ID='''||str_Assignment_ID||''''||'|P_EFF_DT='''||TO_CHAR(str_EFFECTIVE_DATE,'YYYY-MM-DD')||'''')

      l_curr_val_Start_Date = TO_DATE(l_Status_Start_Date,'YYYY-MM-DD')

      )

      ELSE

      (

      l_val_Start_Date = TO_DATE(SUBSTR(str_Dates,1,10),'YYYY-MM-DD')

      l_val_End_Date = TO_DATE(SUBSTR(str_Dates,12,10),'YYYY-MM-DD')

      l_curr_val_Start_Date = ADD_DAYS(l_val_End_Date ,1)

      )

      return l_curr_val_Start_Date

       

      Calling code:

      call_formula ('XX_YYYY_CURRENT_VALUE_START_DT_FF',

      l_Loc_Dates > 'str_Dates',

      l_Assignment_ID > 'str_Assignment_ID',

      l_EFFECTIVE_DATE > 'str_EFFECTIVE_DATE',

      l_Loc_ST_DT <'l_curr_val_Start_Date' default TO_DATE('0001-01-01','YYYY-MM-DD'))

       

      Message was edited by: 4045529