Apex - Not able to exclude column in exported file - oracle

I have an interactive report and the goal is to let the user export the data but without 1 column.
What I tried for the column in question:
1) Server-side condition - Request is NOT contained in value; Value - CSV, HTML
2) NVL(:REQUEST,'EMPTY') not in ('CSV','HTMLD')
The column I am trying to not export is a link with an icon. I tried changing it to 'Plain text' but to no avail.
Oracle Apex version 21.2.0

I managed to accomplish it using this:
instr(nvl(:REQUEST,'~'),'HTML') = 0 and instr(nvl(:REQUEST,'~'),'CSV') = 0

The approach described earlier worked for me with APEX 21.x.
However in APEX 22.1 the CSV download seems to be different; is this correct? For me the values are no longer evaluated again during download and thus I can not control this (we have a server side condition for that that accesses a page Item which we fill with a logic evaluating :REQUEST).

Related

cross-conditional color formatting based on user input in Oracle Apex

I am currently trying to add a feature to an existing Oracle Apex application (Apex). I have already looked around on here and found a few guides but none are helping me specifically with this subject and as I am a complete newbie to Oracle Apex, I am asking this question and thankful for any help:
how can I cross-conditionally color format the text of a text-field returned to the user (see link below) based on another item on the page? More or less like a succes/failure-message.
highlighted succes/failure-message-text
The content from the success/failure-message is returned from a stored procedure, which is run after the user scans a barcode for input (:P1_CANN, text field, label: 'Scanneingabe'). After running, the stored procedure returns two values: the content of the success/failure-message (:P1_CANNBACK, display only page item) and a value 1/0 for scan/failure of the scan (:P1_CSS,hidden page item). Based on the value returned from :P1_CSS I would like to color the text of the success/failure-message correspondingly, for instance to green if the returned value is 1 and red if it is 0.
I am using Oracle 12c as the database. The stored procedure runs a short PL/SQL-Code:
*#OWNER#.DOMENICO_SCANN_ENT(PSCANN => :P1_CANN, pr => :P1_CANNBACK, pr1 => :P1_CSS);*.
This can be achieved using css. There are different ways you can implement this. One way is this:
Create a page item to contain the class name, eg P1_CANNBACK_CLASS
Create a computation to set the value of P1_CANNBACK_CLASS after you have called your stored procedure. PL/SQL code would be something like
CASE :P1_CANN WHEN 1 THEN 'u-success-text' WHEN 0 THEN 'u-danger-text' END
On Page Item P1_CANNBACK, set the css class to &P1_CANNBACK_CLASS.
Note that I used the apex provided css classes (documented here: https://apex.oracle.com/pls/apex/apex_pm/r/ut/color-and-status-modifiers). You can use your style, but then you'll have to define the css classes in the page properties or in a static file. I tested this on a 20.2 instance.

i've created a interactive report in oracle apex and i want to connect different links to different rows of the same column

this is my oracle apex report page i'm having a problem in. It has a interactive report which has 2 columns but both the rows of the same column refer to the same page in the application or for the matter to same url. i want to give different link to different rows of the same column.
You'll have to create links manually for each row. For example (taken from one of my IRs):
SELECT
'f?p=&APP_ID.:' || case when r.id_obr = 6 then 217
when r.id_obr = 7 then 221
end ||
':&APP_SESSION.::NO::' || case when r.id_obr = 6 then 'P217_ID_OBR6'
when r.id_obr = 7 then 'P221_ID_OBR7'
end ||
':' || r.id_obr67
as link, ...
Created in such a way, it'll take you wherever you want, passing any values you want to any page you want.
We dont know what version of apex you are on, but I will just give you the answer that works for me.
Create the links on each column and then create hidden page items on the page you are linking to, then using the links, have them set a value to those page items based on what was clicked.
Then you can just use those page items in your SQL query on the page you are linking to.
Or you could even use those items to create filters, but those a pain in the ass to set up, so I would suggest adding the items to your query for simplicity.

Oracle APEX Interactive Grid: How to access the contents with PLSQL?

I want to access the contents of an Interactive grid with PLSQL. The only thing similiar is the
"Save Interactive Grid Data / Interactive Grid Automatic Row Processing (DML)" process that works on a per row basis.
I would like access the grid with PLSQL in a dynamic action, set a value X e.g. in row 1 column A and use this value X
to complete row 1 column B with a value that I get from the database using value X as input.
Is this possible or is the grid only accessible in javascript?
Yes, you can create a dynamic action that does an Ajax call to run some PL/SQL. You just need the correct triggering element and return conditions.
I'm not quite sure what you're trying to do. This is based off a user's action? Otherwise, why not just use the PL/SQL before you generate the grid?

Oracle Apex - Links in report row that gets a value from the row and uses it to generate another report on a different page

Oracle Apex 5.1
I have a report (Report A) that has a table of values generated from a SQL query.
How do I get a link column to get a value (e.g. employee_ID) of the current row then send that value to another page that has a report (Report B) that is generated using the value from report A.
New to Apex and a lot of the guide or tutorials seem very convoluted for something that seems like quite a standard thing.
Thanks for any help!
This is a pretty basic thing and there are many examples of it online.
The simplest way is to create a column link (in attributes) which links to your target page containing report B. On the page containing report B have a hidden item (e.g. employee_id) and in your link use the set items area to set PX_employee_id to value #employee_id#. Then on report B have a where clause - where employee_id = :PX_EMPLOYEE_ID (replace X with the relevant page number).

How can you properly automatically set which interactive report you navigate to in oracle apex?

I am using oracle apex 4.2 and was wondering if there is a special way to link to a certain default report that I created. So for example below I have made Region Name Pie report along with the default. I changed the aliases to 1 and 2 respectively. I tried using the link example but the synatx is malformed, so I tried another option below.
Here, I tried to set the Report ID Item to a variable that I set as I move to this page. And I looked at the session and this value is being set to 1 as needed(I assumed it was the Report alias I needed to set the value to).
Are these methods viable in Oracle or am I doing anything that is noticeably wrong? Thanks.
Edit: Error for Syntax:

Resources