Oracle Apex : Showing SQL Count beside Navigation Menu Icon and Text - oracle

I want a dynamic number (an output of SQL query) to be shown besides page link text and icon in the navigation menu of my Oracle Apex application (Just the way it has been done in Oracle Apex Opportunity Tracker sample application).
Editing the static text of link is really simple and can be done by going to *Application123\Shared Components\Lists* and editing Application Menu but what I don't know is that how can I display a count there besides the Text and icon.
This is the desired output
This is where I know, I can edit the text (static) and change/select the icon for the link
but where to write SQL query and get its result instead of [&Leads.] , that's is not in my knowledge. Really appreciate help on this !!!!
select count(mycolumnname)
from mytablename
where anotherdatecolumn = trunc(current_date) and (referid='1' or referid='12' or referidD='18');

DEALS should be an application item (declared in Shared Components)
query should be then used in application computations (also in Shared Components)

Related

Edit button gone in Interactive Report Oracle APEX

so im trying to create an interactive report using apex. Usually, it will automatically create CRUD operation in the report. But somehow, the edit button (pencil and paper icon) in my interactive report is gone and i don't know how to fix nor adding them manually. Before it was gone, I changed my IR to Classical report since after i upload the table, APEX doesn't show all the columns (only 8 out of 9 column showed). And after that, I return the table into IR since all the column showed, but this is where the problem started.
Any thoughts?
go to report's Attributes properties tab (on the right hand side of the Page Designer screen)
set the Link property to "Link to Custom target"
target will be "page in this application"
choose it from list of values (or type it manually, if you know its number)
as you'll want to pass item(s) value(s) from the report to form page, set items
That's all.

Oracle Apex Regional Header

Good afternoon,
I am trying to build a page using Oracle APEX 19.2. I have the application built and working fine, but now I am trying to make some changes for ease of navigation and titles.
I am trying to create a region header that would reflect the current data shown on page 4 of my table.
On the page editor, in the Region panes, I go down to the Header and Footer area and am able to create the header text using html and css, but is there a way to create the title based on a column from page 4?
I have a column on page 4 that is titled PN. Is there a way that I can take the text from Page 4_PN and make that the header for the region?
Thank you,
Kevin
is there a way to create the title based on a column from page 4?
Yes. Navigate to "Title" region's property and put (literally) &PN. in there - it'll take value from item named PN and use it as that region's title.

Oracle Apex 19.x external URL based on items value

I'm using Application Express 19.2.0.00.18 with Oracle Database 12c Enterprise Edition Release 12.2.0.1.0.
In our applications (from 4.x) we use Jaspersoft Reports to create PDFs (invoices, labels, shipping documents, etc.) and we use a db function that take in parameters like report name and page items values and returns an html tag for link.
E.G.:
myFunction (myReportName, P01_ITEM_A ,P01_ITEM_B)
return
<img scr="/imagespath/pdf.png">
In this way it is possible to render where needed a clickable image to generate a report based on actual values of items. This solution is heavy adopted in our Apex applications but we are facing some difficulties trying to do the same in 19.x.
We need some help or suggestions in order to reproduce the same feature or to do the same in a different way.
As suggested by Littlefoot I can specify that "difficulties" are :
In Apex 4.x the query : select someFieldList ,myFunction (myReportName, P01_ITEM_A ,P01_ITEM_B) PDF from dual results in a report with the column PDF that is a clickable image (or text, the png is not mandatory). In Apex 19.x the same query results in a report with the column PDF rendered as Plain Text.
In Apex 4.x if I use the same query as Source attribute of a Display Only item it is rendered as a clickable link (text or image). In Apex 19.x the Display Only item is always not clickable.
The solution to both issues is the same. APEX 19.2 is a lot more advanced than APEX 4.x, and by default is more secure. For both Plain Text report columns and Display Only page items the default security setting is "Escape special characters":
This deliberately escapes any HTML tags in the contents to avoid potential XSS (cross-site scripting) security risks.
Simply unselect this setting and your links will appear as links again.

Oracle APEX Interactive Report Column Hyperlinks & Variables

I'm using APEX 5 for the first time and trying to link users to the same page from an interactive report column.
The page being linked to will display different data, depending on which row user clicked.
I don't know what data to depend on to generate the new page, my thoughts are to write (a href) statements but not sure how variables are supposed to be stored this way.
Any advice or help would be greatly appreciated!
Wrong approach, in my opinion.
You should have done this:
create a new page
choose the "Report" page type
choose "Report with Form on table"
It'll create both Interactive Report and a "linked" Form which will be used for the purpose you described. You don't even have to write a single line of code, Apex will do everything for you. You'd just click the icon at the beginning of the Interactive Report row, and it'll lead you to the Form and display values related to that very row.

Including an image in a rich text field

I'm using Apex 4.2 and Oracle 11.g.
I have a rich text field that is used to store the body of an apex-generated eMail using SMTP_MAIl. The eMail generation process works fine. But my users want to include an image (jpg, bmp, etc.) into the body of the email, and don't want to include the image as an attachment.
On the Apex page, the rich-text field is defined as a Rich Text Editor / CDK Editor 3 / Toolbar = Full / Toolbar Expanded = Yes / Skin = Office 2003.
The rich-text field writes to a BLOB column.
If I just paste in the image (Shift / Insert) and then go to save the rich text field, I get a 500 - Internal Server Error.
Can you provide some help so that I can include an image in the rich text field? Ultimately, this will be included in the body of an html_email.
Thanks for your help.
The nature of my problem seems to be related to the 32K limit per Apex page item.
A colleague told me to look for a plugin. I found Enkitec's "CLOB LOAD" plugin. https://www.enkitec.com/products/plugins/clob-load
The plugin works well. It's easy to install, and the directions are pretty clear.
I stumbled on a few things to supplement CLOB_LOAD directions.
1) The table item that the Rich Text will write to has to be defined as a CLOB (and not a BLOB).
2) You have to create a Apex Collection using Apex's SQL Workshop. Be sure to include the Begin and End. The directions reference this.
3) If you already setup the form Apex page using the Apex Wizard and the DML page process is there, The "Return Key Into Item" is empty. At least it was with my Apex Page (4.2). That prevented the "Create" button from working. Once I set the "Return Key Into Item" value to the page item that relates to the primary key column of the table, it helped.
4) I also had to copy the page process for the "Save" button suggested by the plugin directions and assign the copied process to the "Create" button. Once I set those two items up, the plugin worked fine for updating as well as creating. It's a good solution.
Using this plugin, I can place a JPG, PNG, GIF, etc. into the Rich Text field, and it will write it to the CLOB, even when the total page item is greater than 32K.

Resources