bp21 wrote:This is not a problem description. How doesn't it seem to work? Is there an error message? Is no value computed? Is the wrong value computed? Does the computation run when it shouldn't according to the condition?
I have a textarea P9_PRJ tied to table column. I have following computation for that:
<b>computation pt:</b> After header
<b>computation type:</b> pl sql expr
<b>computation condition:</b> instr(:P9_PRJ,'PARTICIPANT: ') > 0
Basically I want a substring of :P9_PRJ value to be displayed if it contains 'PARTICIPANT: ' substring in it.
It doesnt seem to work.
That should work for you.
BEGIN IF INSTR (:p9_prj, 'PARTICIPANT: ') > 0 THEN :p9_prj := SUBSTR (:p9_prj, INSTR (:p9_prj, '.') + 1); END IF; END;
bp21 wrote:Use Debug mode to trace the rendering and processing of a page.
There is no error message that gets displayed. I am unsure how to test if computation is executed.
There is no effect on P9_PRJ value. I am expecting only a substring of it to be displayed.The After Header computation is performed before the After Header ARF process fetches the column value. You can see the order of page events using Utilities > Page Events in the page definition.
Item to be computed is P9_PRJ itself. Its a textarea getting value from database table column.Do you really want to do this? This will modify the P9_PRJ value fetched from the database. When the page is submitted this changed value will be saved, replacing the original column value.
case when instr(:P9_PRJ,'PARTICIPANT: ') > 0 then substr(:P9_PRJ,instr(:P9_PRJ,'.')+1) end