Forum Stats

  • 3,852,790 Users
  • 2,264,137 Discussions
  • 7,905,142 Comments

Discussions

ITEM COMPUTATION Not saving result

Edl
Edl Member Posts: 25
edited Jan 15, 2014 12:21PM in APEX Discussions

I'm returning to APEX development after an absence. I'm hitting a problem that I can't remember how to solve. I have an item which gets its value from a computation. DEBUG output shows that the computation is saving the proper value. Then there is a RESULT = line and another line where the New Value is empty. Where does the RESULT come from and why is there the second line, how do I get rid of them?

0.740730.00037...Perform computation of item: P2_FIT_EXPRESS_DECOMM_CD, type=FUNCTION_BODY4

0

0.741100.00097...Performing function body computation4

0

0.742090.00284...Execute Statement: declare function x return varchar2 is begin BEGIN IF :P2_QUIESCENT_CD = 'Y' AND :P2_REALLY_HAVE_DBMS_DATA = 'Y' AND :P2_SINGLE_DISPOSAL = 'Y' AND :P2_ONGOING_MIGRATION = 'N' AND :P2_LEGAL_HOLD = 'N' AND :P2_SATISFY_DATA_RETENTION = 'Y' AND :P2_ALTERNATIVE_IN_USE = 'N' AND :P2_APPLICATION_DEPENDENT = 'N' AND :P2_DBMS_SUPPORTED = 'Y' AND :P2_EXTENSIVE_ARCH_REPORTING = 'N' THEN :P2_FIT_EXPRESS_DECOMM_CD := 'Y'; ELSE :P2_FIT_EXPRESS_DECOMM_CD := 'N'; END IF; END; return null; end; begin wwv_flow.g_computation_result_vc := x; end;4

1

0.744920.00170...Session State: Saved Item "P2_FIT_EXPRESS_DECOMM_CD" New Value="Y"4

1

0.746610.00072......Result =4

0

0.747330.00037...Session State: Saved Item "P2_FIT_EXPRESS_DECOMM_CD" New Value=""
Tagged:

Best Answer

  • Jeff E
    Jeff E Member Posts: 723 Bronze Trophy

    You have a computation type of PL/SQL function body.  It appears you are setting the value of the item in your function body but then returning null which the computation uses to set the item value.  Either rewrite your function body to return the value you want to set your item to or put your code into a page process.

Answers

  • Jeff E
    Jeff E Member Posts: 723 Bronze Trophy

    You have a computation type of PL/SQL function body.  It appears you are setting the value of the item in your function body but then returning null which the computation uses to set the item value.  Either rewrite your function body to return the value you want to set your item to or put your code into a page process.

  • Edl
    Edl Member Posts: 25

    Thanks, I just got back into this and could not get my head around it. Easy to return the value!

This discussion has been closed.