How a variables retrieve and stores data - oracle-apex

I working on a development on Oracle Application Express and I am new to this application.
I have a stored procedure that takes a variable from the Oracle APEX application when executed. A button triggers this action.
My PL/SQL code on Oracle APEX takes the file name I uploaded as parameter. See below code.
BEGIN
CLOSE_PO(:P_FILE_NAME );
END;
The file name is stored in a temporary table on the database.
Can anyone briefly explain how the variable in the PL/SQL code is able to retrieve the filename in the table?

I don't understand very well your question but I try to help.
In APEX you can upload files by creating in a region a File Browse item that manage the corresponding dialog and show the filename you select for uploading.
For the complete list of steps and items to create I use this documentation .
The file name is stored in the page item value (e.g. :P1_FILE_BROWSE).
The file is stored in the APEX table APEX_APPLICATION_FILES and it is possible to query it like
SELECT *
FROM APEX_APPLICATION_FILES
WHERE FIELNAME = :P1_FILE_BROWSE
In the PL\SQL for an action you can query the table and retrieve the variables you need to pass to stored procedure as parameters.

Related

How to create a filter in powerbi that will dynamically query the db using a SP with a parameter

I am trying to run a direct query on my DB and apply a filter input by the user. The user input would be used as a parameter for my Stored Procedure that retrieves the data I want to display to the user. The reason for running a direct query and not just refreshing the data and then the user filtering from all of that data, is that the database is really large and it would make the report file approx. 650mb in size. My idea is that with a direct query, I can pull only the data required through an indexed column that the Stored Procedure uses to filter.
Currently I was able to create a parameter in the Query editor and use it in a query function but this creates an "Invoked Function" table. If I use these results in my report essentially the user can only filter through the result I filtered in my query editor. I want the user to be the one to input that value and the report to dynamically load it.
As far as the filter field, I am using a slicer and added the search capability to it so they can type out the search value and select the result in the list. Ideally I would like a textbox that they can type the value they want and search for it.
Is this possible in PowerBI? and if so how could I accomplish this?
You have to download a separate application called Power BI Report Builder to accomplish this and create a paginated report. See Url below:
Paginated Reports

Transfer blob betwean two Oracle Apex page

On first oracle apex page (page_1) i have File Browse control and Storage Type (apex_application_temp_files).
Is it possible blob_content save in application data and use on other page (page_2).
On second page I have Processes and need insert this blob in database.
You can use APEX_COLLECTION to store the Blob
https://docs.oracle.com/database/121/AEAPI/apex_collection.htm

Insert static data along with data loading wizard utility in Oracle APEX

I am new with Oracle APEX and trying to explore all options in APEX (5.1). My query is related to Data loading wizard in Oracle APEX. I created one table which has three columns, and I set up that table as Data Load Definitions.
This is the process that I expect through the data loading wizard:
In the first page of Data load Source, I created one radio page item and by selecting that, it should be assigned to the first column in the table.
I will upload a CSV file with two columns which will be assigned to the second and third columns.
So, whatever records are there in the CSV file, by selecting page item that static strings need to be inserted along with file data.
I Googled the same thing but I didn't find any proper solution for this requirement. If you can help me then it would be appreciated.
My preferred approach for this sort of thing is to use a staging table as the target of the Data Load wizard; then add a process at the end that copies the rows from the staging table to the final table, setting the static column(s) at the same time; then delete the rows from the staging table.
Note: add a column SESSION_ID to the table with a trigger that sets it to v('SESSION') so that the process will only pick up rows for the current user session.

How do I chain stored processes together using only EG4.3?

I'm creating an HTML based data dictionary using stored processes in EG4.3 running on 9.2 BI Suite on Unix.
We have had our middle tier web servers effectively turned off, so this STP can only be used inside EG itself.
Using a plethora of puts, I have created the HTML pages that I require in four stored processes:
The main page, that takes as a prompt input, a wildcard for (for example) a column in question and returns in HTML a list of datasets where this column appears.
From this, the user can select a library, table or column to drill down into more details
A stored process that returns in HTML a list of datasets in a selected library;
A stored process that returns in HTML a list of columns in a selected table;
A stored process that returns in HTML a more detailed listing of a columns attributes.
The first STP works great and I can see a nicely formatted listing of information, with library, dataset and column links.
My problem is as follows: When I click on a link, I would like that to run the requisite STP, and return the HTML page to the same Results tab that my initial report is in.
I've checked endless sas articles and can't find an answer.
Here is the code I'm using to generate a link to the other STP's (where chars[i] is an a-z value from a dataset):
/* Get the root session ID*/
hrefroot = symget('_THISSESSION') || '&_PROGRAM=/Shared Data/Team/stored_process/';
/* Get the next stp path (neither ?&_PROGRAM= nor the below seem to work)*/
hrefnextstp = "?_PROGRAM=/Shared Data/Team/stored_process/";
// build up the HTML using puts //
stpval="stpddlibrary";
stplink=cats('', chars[i],'');
put stplink;
How, with the above in mind, can I chain together multiple stored processes using just EG?
There's no &_URL seen as though I'm not using the web, so that ruled that out.
I hope I've articulated that well..
The problem you are encountering is that the HTML page is trying to navigate to a web service to pull the next page. However, EG isn't able to function as a web server to respond the browsers request.
The stored process code is best used via the web mid-tier or the SAS MS Office plug-in. If those two tools are not available, you might consider moving the logic out of the SAS Stored Proc and into EG directly and use the response to drive a second flow in your eg project. If you are looking to drive a web page you can call sas via Java and the SAS IOM Bridge and talk to SAS the same way EG does but your UI in this case would be build in Java. Another suggestion, try using vbscript to drive EG via COM.
Here is a link to controlling EG via COM:
http://www.sascommunity.org/wiki/Not_Just_for_Scheduling:_Doing_More_with_SAS_Enterprise_Guide_Automation
The code you provided would work well to build the url as serviced by the SAS Mid-Tier stored proc web service. Stored in a SAS Stored proc you can build the url to the mid-tier pointing at other stored procs using the SAS provided web interface for stored procs to see how the parameters and url is constructed.
If your mid-tier web service was online, you might also be able to call the stored procedure in your code. Calling it via proc http, here is an example from sas docs:
proc http in=in out=out url="http://localhost.com/rsm/rstool"
method="post"
ct="application/x-www-form-urlencoded";
run;

VBA - Data string connection to Web Access Table on Sharepoint

I was wondering if it is possible to create a data connection through VBA connecting an Access 2010 table hosted on SharePoint 2010 and Excel 2010? if so what would the code look like? The code would need to be in vba for excel
Since my original post, I have found a work around and I hope this helps others. Here is the connection string needed to connect excel to a Access service table.
Sub LinkedSharePointList()
ActiveSheet.ListObjects.Add SourceType:=xlSrcExternal, _
Source:=Array("URL HERE", "TABLE NAME HERE", _
"{GUID HERE}"), LinkSource:=True, Destination:=Range("A1")
End Sub
* It is important to note that you must save the excel file as a 97-2003 .xls file. The excel file will still run macros and save (though there will be an warning as you try to save the file, just check the don't remind me box). Also, in order for the table to update to your access service table, you need to right click the table (in excel)-> table->synchronize to SharePoint list.
I also wrote a macro to update the access service table using a button control but did not include that here. If you are unsure what your GUID is then import the table from access service to excel, under the data tab->connections->Properties->Definition and in the 'Command Text:' after will be the GUID.