© 2015-2024. MindStreamAnalytics.com

Oracle BUSINESS RULES

USING @RETURN IN BUSINESS RULES

There is a very useful function available to business rule authors, @RETURN. This function allows you to return a message to the user executing the business rule and terminate the business rule. One very valuable use of this function is when verifying the values input into run time prompts. I use it extensively in building business rules for workforce and capex planning where there may be multiple inputs obtained using run time variables.

The format of the function is @RETURN( msg, ERROR). The msg can be a literal or, more interestingly, can be the @CONCATENATE function which can be used to return values of dimensions or even the value input into the run time variable.

  •  The @RETURN can only be used in a Member Calc Block.
  •  The documentation says that there are multiple values for the second parameter but the only one that works is ERROR without quotes.
  •  The message is returned to the user and logged to the Essbase application log.
  •  FIX to a single intersection so that the edits are only done once.
  •  May need SET CREATENONMISSINGBLK ON if the intersection that you use for the edit does not exist. Make sure to turn it off after the edits.
  •  The @RETURN terminates the business rule execution but cannot stop the saving of the data on the form.
  •  Example 1 - fix and return literal message :
    • FIX( "Budget","Working",{gv_1_Entity},{gv_1_CostCenter},{gv_1_Project},{gv_Exempt},"No Employee","Local_Input",&svBudYear,"BegBalance" )

      SET CREATENONMISSINGBLK ON;

      "Status"(

      /* Must be at the base level of Entity, Cost Center and Project */

      IF( NOT @ISLEV("Entity" , 0) )

      @RETURN( "You must select a base level Entity member.", ERROR );

      ENDIF

      IF( NOT @ISLEV("CostCenters" , 0) )

      @RETURN( "You must select a base level Cost Center member.", ERROR );

      ENDIF

      IF( NOT @ISLEV("Projects" , 0) )

      @RETURN( "You must select a base level Projects member.", ERROR );

      ENDIF

      /* Backfill end month must be after the hire month if entered */

      IF( {gv_EndMonth} != #Missing )

      IF( {gv_EndMonth} < {gv_HireMonth}->"MonthNumber" )

      @RETURN( "The backfill end month must be after the hire month.", ERROR );

      ENDIF

      ENDIF

      /* AIP or Sales or Production no two */

      IF( {gv_AIP_Pct} > 0 )

      IF( {gv_SalesIncentive_Pct} > 0 )

      @RETURN( "If an AIP % is entered then Sales Incentive Target % cannot be.", ERROR );

      ELSE

      IF ( {gv_ProdIncentive_Pct} > 0 )

      @RETURN( "If a AIP % is entered then Production Incentive Target % cannot be.", ERROR );

      ENDIF

      ENDIF

      ENDIF

      /* Sales not Production */

      IF( {gv_AIP_Pct} == 0 )

      IF( {gv_SalesIncentive_Pct} > 0 )

      IF( {gv_ProdIncentive_Pct} > 0 )

      @RETURN( "If a Sales Incentive Target % is entered then Production Incentive Target % cannot be.", ERROR );

      ENDIF

      ENDIF

      ENDIF

      )

      SET CREATENONMISSINGBLK Off;

      ENDFIX

  •  Example 2 - Using @CONCATENATE :
    • IF( ( {lv_Promotion_Pct} / 100.0 ) < "Promotion Type 1 Minimum Increase Percent"->"No Employee"-->"NoBusinessUnit">"NoOperatingUnit"->"NoDepartment"->"NoEmployeeType"->"NoProject" ->"NoProduct"->"BegBalance" OR ( {lv_Promotion_Pct} / 100.0 ) > "Promotion Type 1 Maximum Increase Percent"->"No Employee"->"NoBusinessUnit"->"NoOperatingUnit"->"NoDepartment"->"NoEmployeeType">"NoProject" ->"NoProduct"->"BegBalance" )

      @RETURN(@CONCATENATE( "The Promotion Percent must be between ",

      @CONCATENATE( @CalcMgrDoubleToString(@ROUND( "Promotion Type 1 Minimum Increase Percent"->"No Employee"->"NoBusinessUnit"->"NoOperatingUnit"-->"NoDepartment"->"NoEmployeeType"->"NoProject"->"NoProduct"->"BegBalance" * 100, 2 ) ),

      @CONCATENATE( " and ", @CalcMgrDoubleToString(@ROUND( "Promotion Type 1 Maximum Increase Percent"->"No Employee"-->"NoBusinessUnit"->"NoOperatingUnit"->"NoDepartment"-->"NoEmployeeType"->"NoProject"->"NoProduct"->"BegBalance" * 100, 2 ) ) ) ) ),ERROR);

I have shown you examples of how to use the @RETURN function to add functionality to your business rules to enforce edits and inform the user of the errors. I hope you find this useful.

Partner SpotLight

Oracle

Oracle has the most comprehensive suite of integrated, global business applications that enable organizations to make better decisions, reduce cost..

Oracle Profile

Case Studies

Accumen

Thanks to the intervention of MindStream Analytics, Accumen's Finance department can now model their business with a new, more organized structure that isn't conventionally available in NetSuite.

Acme Brick

Acme Brick turned to MindStream Analytics for help implementing OneStream to replace their outdated TM1 solution.

Alterra

Alterra sought the expertise of MindStream to address the challenges they faced in their Capital Planning process.

ATCO Group

Energy conglomerate ATCO operates worldwide in utilities, power generation, and related services.

Avalon

Working with MindStream Analytics, Avalon Healthcare Solutions adopts NetSuite Planning and Budgeting to accelerate budgeting and forecasting processes.

Bayer Health Care

Bayer Healthcare implemented Hyperion Planning and Workforce Planning in 10 weeks to dramatically streamline their Income Statement budget and Workforce Planning process..

BluEarth

MindStream Analytics' partnership with BluEarth Renewables epitomizes the power of technology and collaboration.

Celgene

An Oracle Hyperion Planning Upgrade provides multi-national organization Hyperion Application optimization and stabilization.

Cleaver Brooks

OneStream XF was chosen as the platform that would transform Cleaver-Brooks' Finance processes.

CoorsTek

The collaboration between CoorsTek and MindStream resulted in significant improvements in CoorsTek's financial consolidation and reporting processes.

Elite Body Sculpture

MindStream Analytics' collaboration with Elite Body Sculpture encapsulates the transformative potential of targeted tech solutions in streamlining administrative processes.

Enlyte

Enlyte, a merger of Mitchell, Genex, and Coventry, faced challenges with disparate financial solutions and the need for combined reporting.

Flanders

MindStream Analytics collaborated with Flanders to implement OneStream Consolidation and Reporting solution.

Foley Products

Foley Products was facing a significant challenge with its Excel-based actual management reporting system.

Harte Hanks

The collaboration between MindStream Analytics and Harte Hanks culminated in a highly customized, user-friendly NetSuite implementation.

Interface

Interface used a complex, manual, excel-based FP&A process for monthly review, and the summary data was loaded in OneStream.

Kymera International

Thanks to Mindstream Analytics' assistance, Kymera was able to load all of their data into OneStream and validate it successfully.

MacLean Fogg

MacLean-Fogg partnered with MindStream, a leading implementor specializing in modernizing and optimizing enterprise systems.

MEPPI

MindStream's expertise and experience were sought to conduct a vendor selection initiative focusing on MEPPI's F2023 planning process.

OUAI

MindStream Analytics and OUAI's collaboration showcases the transformative power of strategic technological intervention.

Plaskolite

By migrating to OneStream, Plaskolite has achieved a material reduction in consolidation time and overall Financial Close cycle, eliminated the hours spent compiling and verifying data in Excel, streamlined its Planning, Budgeting and Forecasting model and delivered flexible and timely reporting that enables more strategic analysis of their financial data.

Redwire

Understanding the nuances of Redwire's challenges, MindStream Analytics devised a holistic approach to overcome them. The implementation of NetSuite was just the beginning.

Simon

Simon's existing corporate Hyperion Financial Management (HFM) production application was consolidating at a rate of seven hours, a performance issue causing great headache to corporate Accounting.

Source Code

The successful transition to OneStream revolutionized Source Code's financial reporting.

Subway

Subway collaborated with MindStream Analytics for the NetSuite Analytics Warehouse implementation.

UPenn

MindStream Consulting and AppCare team members are proud be working side by side with UPenn university in accomplishing this implementation and along with continuing our AppCare services after go-live.

USG

USG was an Oracle Hyperion customer realizing that it needed more specialized support for its various Oracle Hyperion applications.

Vantiv

Dividing a hyperion planning application, expanding the hyperion footprint to forecast on the business? Customer categories.

Versant Health

Versant Health engaged MindStream to help resolve the challenges they were experiencing with their consolidation, close, and financial reporting processes.

Virginia Spaceport Authority

The MindStream team implemented the Standard + Workforce NetSuite Planning & Budgeting.

WeWork

MindStream Analytics determined that the best solution was to implement Oracle Essbase Cloud as part of the Oracle Analytics Cloud (OAC) platform-as-a-service

WindStream

Innovative use of essbase to streamline and connect hyperion financial management for enhanced financial analysis.

XY Planning

MindStream Analytics, well-versed in addressing such challenges, presented a comprehensive Netsuite solution for XY Planning.

Related Links