Skip to Main Content

Can StaticContent Regions be changed via Dynamic Actions in v20.1?

AmbaJul 10 2020 — edited Jul 10 2020

Hello I would appreciate your help with this one..

I am trying to dynamically change the image and text of a page, using Dynamic Actions. While I can successfully set up the page to display image and text using initial (SQL based) values, they do not update on Dynamic Events or via PL/SQL's SELECT INTO :ITEM statements.

My use case is that when user triggers a change in the DEPTNO_USR_INPUT item (I am using the Oracle standard EMP table), a Dynamic Event auto populates the item to its right: EMPNP_USR_AUTOPOPULATED -- with the EMPNO of the  longest serving employee in that department..The submit button then does the DML form processing and retrieves the employee details. All that part is working. (which is amazingly low-code ajax development by this inexperienced developer, for sure)

--

=> now, the same Dynamic Event is also setup to change the value of an image and text in the StaticContent region (called StaticImageRegion) further down the page. This does not work... I have even tried to do the same thing via another FormRegion, which also doesn't work.

Expected behaviour: The image below would change to a different one (ID=2) and text will change to "more text". [I have hardcoded SQL by ID just to show items.  In a real application they will be driven by :bind variables etc]

I am definitely missing quite a few concepts - even though I can get Ajax type forms to work in Apex 20.1.. what do you suggest? Screenshots below:

update: I have learnt that I cannot use Form Regions to 'refresh' under any circumstances (and a submit/DML does not suit this purpose). Therefore a Classic Report region is better suited. In any case, so far it looks like StaticContent Regions cannot be updated once they have been loaded onto the page for the first time.. (unless someone knows if this is incorrect - it would certainly make this  a lot easier..)

Part 1/2 of the page:

Screen Shot 2020-07-10 at 7.50.53 PM.png

... Part 2/2 of the page continues below

Screen Shot 2020-07-10 at 7.50.28 PM.png

Here is the PageDesigner View: the DynamicAction 'evDeptChange' triggers multiple events (I have used Alert() to verify that page execution reaches all of them correctly. While the first SetValue works like a charm.. the others do not. [ Execute PL/SQL code is set to work on the StaticRegion whilst Refresh is set to refresh the Image form..none of these work] btw, I store all images in a table called GALLERY in which column IMAGE is a BLOB.

pastedImage_4.png

.... and below: I have created a FormRegion called ImageFormRegion just to try a different approach (which does not work).

pastedImage_3.png

Comments
Post Details
Added on Jul 10 2020
9 comments
494 views