# What Happens to APEX Page Items that are Never Rendered?

Every APEX page item has a Server Side condition which controls whether the item is rendered on the page. They're various server side condition options and for the purpose of this article we'll just set it to `Never` (can do things like queries that return a row, PL/SQL expressions, etc).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704551463125/3e4391e3-bd00-43d9-9140-5c824d065d8b.png align="center")

One misconception is that all references to this page item will be null / won't do anything. This is not correct as page items that aren't marked to be rendered can still have values. In the example below I have two page items:

* `P6_ALWAYS` has no conditions and will always be shown on the page
    
* `P6_NEVER` its condition will be set to `Never` and not render on the page
    
* Both of the page items have a item source as a `Function Body` with the following code:
    

```sql
-- For always for P6_ALWAYS is "always" and P6_NEVER is "never"
logger.log('Source for always/never');
return 'always/never';
```

When the page is run it looks like:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704553679665/a2715f39-745e-4980-aaa3-f893e2c6ac1e.png align="center")

Things to note:

* `P6_NEVER` was not rendered
    
* No values in session state (i.e. `P6_ALWAYS` item's value will only be saved in session state when the page is saved)
    
* Looking at the logs only the `P6_ALWAYS` source code section was run
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704553961189/004e2fe2-c66b-4fe3-b9f3-2017090b0b5d.png align="center")
    

A new computation is now added to the page to set a value for `P6_NEVER` as shown below:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704554124545/d441d492-a3b5-4645-b4ee-1acb0884f5e9.png align="center")

When the page is run it will look the same as before except that `P6_NEVER` has a value in session state. This means that when referencing `P6_NEVER` in a block of SQL or PL/SQL it will have a value, however if trying to reference it on the page (via JavaScript) it does not exists nor has a value.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704554228795/7ab6baa1-e4a8-4aea-8231-2d8d3e1c395a.png align="center")

In the past when I've explained this to people (both new and experienced APEX developers) and they think it's a bug. It isn't for the following reasons:

* APEX has an order of operations. Essentially it runs "top down" for everything listed on the left side in Page Designer
    
* Since Pre-Rendering is done **before** page items are "processed" APEX can't know if a page item should not be rendered
    
    * This can also be true of a page item's condition references another page ex. For example if a page item's condition is `P6_ADMIN_YN = 'Y'` then APEX will only know if this is true or false once it starts to process the page item.
