Footer navigation using pl/sql - substitution strings

Hi
I want to make a footer navigation (a BLAF like footer with the same captions and links that appear in the Tabs and the Navigation Bar) using a PL/SQL region. The code I want to use should work for any HTML DB application.
The procedure could be defined like this:
PROCEDURE prb_footer_navigation( p_application_id VARCHAR2
, p_page_id VARCHAR2
, p_session_id VARCHAR2);
p_application_id will be used to get the caption and links of the specific application and p_page_id will be used to know which tab is selected.
I'm using this query in the procedure:
SELECT t.tab_text caption
, t.tab_target link
, t.tab_sequence num
FROM flows_010600.wwv_flow_toplevel_tabs t
WHERE t.flow_id = p_application_id
ORDER BY t.tab_sequence
(the user has been granted select from flows_010600.wwv_flow_toplevel_tabs)
The problem is:
tab_target has substitution strings like '&XXX.' or '&PX_XXX.', so how can I get the real link with resolved substitution strings using pl/sql?
Something like function_resolve_string(p_string, p_session_id) would be appreciated...
Thanks in advance!

A.U.,
Have you considered looking at how the navigation bar gets onto your page by examining the page template? You'll find something like this in the body section: 
  <table width="100%" cellpadding="0" cellspacing="0" border="0" summary="">
    <tr>
      <td valign="top" class="t1Logo">#LOGO#</td>
      <td align="right" valign="top">#NAVIGATION_BAR#</td>
    </tr>
  </table>Just copy and paste that onto the end of the body section, or into the footer section of the template, although the footer might not support all the same substitution patterns.
If that's the kind of result you have in mind, do the same thing for the (html) tables that contain #PARENT_TAB_CELLS# and #TAB_CELLS#. I don't guarantee this will work, but it's worth experimenting with.
Scott

Similar Messages

  • Conditional column display in report using column substitution string

    Hi everone,
    I was wondering if it's possible to display a column conditionally, based on a values in another column of the same report.
    Can you use the column substitution strings or does the condition strictly require SQL, PL/SQL
    or page item values?
    kind regards,
    Cleo

    I dont think we can add a condition to display the column in a report based on the other column of the same report,
    Just add a (CASE WHEN <your condition satisfies> THEN column ELSE null END) in your report source for the column you want to display conditionally.
    --Mahesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Urgent : static substitution String

    Hello Marvel team,
    I have already post a message but no help ....
    I have a static substituion string defined in the application attributes page: DEPART
    If for example I need to use this static substitution string in a before region process
    BEGIN
    select dname into :P18_TEST
    FROM DEPT where deptno = &DEPART. ;
    END ;
    I have the following error:
    ORA-06550: line 4, column 63: PL/SQL: ORA-00919: invalid function ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored
    Any help please ?
    Jina.

    Jina - I don't understand why you started a new thread. I responded to your other one and so did Tyler. You should follow Tyler's and now Michael's admonitions and use bind variable notation (:DEPART) instead of substitution string notation (&DEPART.). FYI, there were some changes in the Application Builder that account for the different behavior in this regard since the 1.5 release.
    Scott

  • Subtitution of application substitution string only in uppercase?

    Dear Apex users,
    I am working on a specific template for a company. I would like to use a substitution string for the application name, so that the template need not be adapted for each application.
    It works when I create a substitution parameter APP_TITLE and I reference it in the body using &APP_TITLE. The only problem is that I entered a mixed case string and on the page I see an only uppercase string.
    Is there a way to use mixed case substitution strings?
    Greetings,
    Dik

    No, lower case is reserved for HTML expressions and the like.
    Scott

  • How to reference the Instance name using Substitution string or SQL

    All:
    We have an Application that will be replicated in multiple Apex instances and would like to display the current Oracle Apex Instance name ( Similar to the &APP_USER. on the Welcome portion of the page ) .
    Is there a substitution string for this ?
    We plan on using a Show/Hide region on the splash page titled [About], that when clicked displays an HTML region with the subsitution strings.
    If no substitution strings, can someone help with an SQL that returns the Instance name ?
    Thanks for all the help.
    Aubrey Fernandes

    Aubrey Fernandes wrote:
    I currently have 3 URLs to get to my Development, QA and Production servers & will have many more production servers with different Application Ids.
    Development = http://canqa101:7777/pls/ngcrmd01/apex
    QA = http://canqa101:7777/pls/ngcrmq01/f?p=100:1
    Production = http://cancs105:7777/pls/ngcrmp01/f?p=100:1
    What I need are the portions before the final forward slash ( canqa101:7777/pls/ngcrmd01 ) which I assumed is the Oracle Apex instance.That information is determined by the web server configuration (e.g. the DADs when using OHS) rather than through APEX itself. There are no built-in substitution strings for this. Create an application item and an On New Instance (new session) computation to set the value using the function<tt>owa_util.get_cgi_env</tt> function to get the CGI environment variables <tt> HTTP_HOST</tt> and <tt>SCRIPT_NAME</tt>. You can then reference the value in the region using substitution string syntax.

  • Can substitution strings be used for table name references?

    Hi,
    I was wondering if it's possible to use substituion strings for table names in SQL queries. This would allow for me to edit all references to a table at one location. For instance, if a table name or dblink changed, I could edit the substitution string or application item to ensure all the queries reference the new table.
    For example:
    select * from &table1.
    table1 would be the substitution string for the actual table name
    I know this is possible if I used a pl/sql function returning a query, but I would much rather use a substition string in a SQL query.
    Thanks in advance.
    Brian

    i think not
    because how create the fields of * in this case
    in the other because all is dynamic, i think that you obtain only an error

  • Substitution strings in chart sql query

    Hi Guys,
    I am creating line charts and bar charts based on a query in HTML DB 1.5. I am using substitution strings in the query. Though I can use substitution strings in the line chart, I cannot do it in the bar chart. I am using almost the same sql query in both line and bar charts.
    The sql query in line chart is
    SELECT null, TO_CHAR(t1.extract_date, 'W-MON-YYYY') extractdate,
    MIN_OF_AVERAGES(AVG(&P40_METRICS.),:P40_REGION_LIST,:P40_SUBREGION_LIST,NULL,:P40_METRICS,'ind') orgid
    FROM ind t1,geography t2
    WHERE t1.country_id = t2.country_id(+)
    AND t2.region_name like
    DECODE(:P40_REGION_LIST,'ALL REGIONS','%',:P40_REGION_LIST)
    AND t2.subregion_name like
    NVL(:P40_SUBREGION_LIST,'%')
    GROUP BY TO_CHAR(extract_date, 'W-MON-YYYY')
    order by to_date(extractdate,'DD-MON-YY')
    The sql query in bar chart is
    SELECT null, TO_CHAR(t1.extract_date, 'W-MON-YYYY') extractdate,AVG(&P40_METRICS.) orgid
    FROM ind t1,geography t2
    WHERE t1.country_id = t2.country_id(+)
    AND t2.region_name like
    DECODE(:P40_REGION_LIST,'ALL REGIONS','%',:P40_REGION_LIST)
    AND t2.subregion_name like
    NVL(:P40_SUBREGION_LIST,'%')
    GROUP BY TO_CHAR(extract_date, 'W-MON-YYYY')
    order by to_date(extractdate,'DD-MON-YY')
    The min_of_averages function in the line chart query is some function I am calling. Even if I cut-paste the line chart query in the bar chart I get the error.
    The substitution string which is giving the problem is "&P40_METRICS."
    The error I am getting is
    Query cannot be parsed, please check the syntax of your query. (ORA-00909: invalid number of arguments)
    The only difference I see is that line chart query is inside a series and bar chart is not, does this make a difference??? Or is it because I am using the substitution string in choosing the column??? Please help!!!!
    Thanks,
    Swaroop

    Swaroop,
    You might be using an HTML bar chart and an SVG line chart, I can't tell, but their implementations differ. You won't be able to use a substitution string to replace a column name in the query in the situation you found, you'd have to figure out a way to construct the query string before it gets executed and I'm not sure the chart pages will let you do that.
    Scott

  • Substitution string used in custom Report column name does not display in PDF version of report

    I am using Apex 4.2.6.00.03, Apex Listener 2 via Glassfish4 and have set up all my applications and reports on this system.  We previously used Oracle 10.2, with Apache with a custom fopping document.
    My issue is that I have a report that has custom column headings using a substitution string to pull in the begin or end date for the report.  When the report is run and displayed, the column headings appropriately display the date.  However, when I try to set up the Print to PDF option, the column headings are not displaying correctly.
    Is it possible to use a substitution string in the column heading?  I am able to use the substitution string in the Page Header and Page Footer and those display correctly.
    In the Report Attributes setup I have set the "Strip HTML" to Yes and I have four columns that are using the &"ITEM NAME". string.  See below for actual display:
    The report column headings in APEX displays correctly (bold is the substitution detail): 
    Fund    Account Description          Balance 07/01/2014     Budget/Goal FY 14-15     YTD Actual 02/28/2015         Ending Balance 02/28/2015
    In the Print Attributes setup, when I get to the Report Columns section, the Heading column displays the headings as set up in the Report Attributes custom and I am not able to edit these names.  See below:
    In the version of the report that is Printed to PDF I get the following for display:
    Fund           Account Description           Balance %26amp;P347_BEGIN_DATE.     Budget/Goal %26amp;P347_FY.     YTD Actual %26amp;P347_END_DATE.     Ending Balance %26amp;P347_END_DATE.
    Any assistance would be greatly appreciated.
    Thanks,
    Pat

    First, the misspelled word is a test object and not data.
    Second, all data display correctly.
    Third, text object is displaying the old misspelled word.
    Fourth, I have eliminated the possibility that problems in of my pdf export routine cause this issue by exporting directly from Crystal Reports Viewer. I print the report to the crystal report viewer. The report looks good. The text object is spelled correctly. Then I click the Crystal Reports viewer's export button in the left upper corner and I export to both EXCEL and PDF. The excel export looks good. The pdf export is misspelled. All the export occurs internally in Crystal reports.
    Fifth, I found outthat all users who have this problem have the ADOBE PDF writer installed. I am just suspicious that ADOBE writer is interferring with Crystal export
    Sixth, I cannot recreate this problem on any of our development and test machines. It only happens on end-user laptops.
    Seventh, I changed the name of the report that had this problem and created a new version and installed on end-user laptop. The behaviour still persists. User saved the report as both RPT and PDF. RPT export looks good. PDF version has the spelling problem. Data on both reports is up-to-date and good. I copied the same RPT export to my PC and exported it to PDF, the pdf looks good. That is why I think something on the end-users laptops is causing the export to use some cached template.
    One more thing I did was to change the report name in VB.NET project, recreated a new package and installed on end-user's laptop. The same exact problem is still there.
    I have worked with Crystal Reports more than 15 years and I have never such a weird behaviour before. I know this sounds very weird. We are all baffled by what is happening.

  • Using default application date format substitution string

    I'd like to reference something like ":app_default_date_format" to set date formats in sql statements.
    Does a substitution string exist that returns the default application date format?
    Thanks,
    -Ken

    Hello Ken,
    >> I'd like to reference something like ":app_default_date_format" to set date formats in sql statements.
    Isn’t the whole point of defining an application date format to avoid the need to specifically reference date formats?
    >> Does a substitution string exist that returns the default application date format?
    I’m not familiar with an official substitution string for the application date format but you can use wwv_flow.g_date_format .
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • Substitution string inside PL/SQL generated content (single column source)

    Hi! I have a contents table that contains the HTML source (using the HTML Editor Standard item) stored on a single varchar2 column like this.
    -- some other HTML source here ---
    href="f?p=&APP_ID.:17:&APP_SESSION."
    -- other HTML source here --
    (Sorry, this forum is parsing my HTML source but it's just as simple as that)
    I'm using a PL/SQL Dynamic Content region to select and display my contents using the htp.p procedure. But the problem is the built-in substitution strings in the URL of my content is just displayed as it is. I know that this maybe because htp.p will treat the parameters just like a regular string and the Application Express Engine don't have a chance to parse it. But can somebody show me an alternative solution for this?
    Right now, I'm just using a static HTML region as a temporary solution. But I really am curious on how can this be done using PL/SQL dynamic content region. Or what design is best on content management-like application.
    Thanks!
    Mertz

    Mertz,
    I'm not sure I understand but say your database table's column contains 'Hello the session id is &APP_ID. ...'. Using a PL/SQL region you could emit that column thus:for c1 in (select content_col from content_tab) loop
      htp.p(replace(c1.content_col, '&' || 'APP_ID.', :APP_ID));
    end loop;Splitting up the substitution item name into concatenated strings avoids problems with the Builder doing substitutions when you don't want it to.
    Scott

  • Using substitution string

    I know you can refer to a substitution string by doing *&string.*
    Can you refer to it by doing *:string* also
    Howard

    Howard
    You can use the :item_name syntax as a bind variable in Sql and pl/sql within an APEX application.
    APEX substitution strings are described here http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#insertedID6
    varad

  • Using a SQL Query in an Alert and Matching a String

    I've created an alert in 12.0.4 using a SQL Query and the field that I'm trying to match is a string.  Originally the query returned multiple rows but when the alert still didn't fire, I modified the query WHERE clause to return only one row:
    NAME                                RESPONSE
    Are area lights working?            No
    My expression in the metric is RESPONSE.  In the Monitor I'm matching a string equal to No.  (Do I need double quotes around the matchvalue?  Single quotes?  No quotes?)  The metric is in the 15min scan group, the role is xMII Developers and I'm in that role. The monitor alert string is ' =  '.  Both metric and monitor are active and I've subscribed to the monitor.  Other alerts in the 15min scan group (all based on tag queries) are firing off properly.
    Why is nothing showing up in the Alert Log?
    David Macindoe

    David,
    Did you figure out the answer?  If not, I will try to find someone to address your question.
    Mike

  • How to use Native SQL String

    Hi all,
    How do i use Native SQL String in the Reciver JDBC Adapter.
    Do i need to change the message format could u suggest me some blogs on the same.
    Also please can anyone let me knw if i can use this for stored procedure.

    hi aditya,
    there shud be no format as such. for sql xml format there are specific structure. but for native sql there shudnt be any specific structure.
    as pointed in sap documentaion:
    Instead of an XML document format, a text is expected that represents any valid SQL statement.
    When inserting a line into a table the corresponding document looks as follows:
    INSERT INTO tableName  (column-name1, column-name2, column-name3) VALUES(‘column-value1’, ‘column-value2’, ‘column-value3’)
    so jus make sure that u give a valid sql statement becoz if will be passed as it is to the database and try ur scenario.
    regards,
    latika.

  • Using a comma-delimited string in Dynamic SQL

    Hi --
    If I receive a comma-delimited string as an in parameter, can I simply use that (in string format) when building my dynamic sql?
    Thanks,
    Christine

    The problem is, that you can not use bind variables
    here, only literals. This causes
    eventual performance problems.And to avoid the inevitable database performance problems Dmytro mentions you can use a function to convert the string to a varray and select from that. This also avoids having to use dynamic sql.
    First you create a varray and conversion function.
    SQL> create or replace type tabstr_t as table of varchar2(255)
      2  /
    Type created.
    SQL> create or replace function tabstr (
      2      p_str in varchar2,
      3      p_sep in varchar2 default ','
      4      )
      5  return tabstr_t
      6  as
      7      l_str long default p_str || p_sep;
      8      l_tabstr tabstr_t := tabstr_t();
      9  begin
    10      while l_str is not null loop
    11          l_tabstr.extend(1);
    12          l_tabstr(l_tabstr.count) := rtrim(substr(
    13                  l_str,1,instr(l_str,p_sep)),p_sep);
    14          l_str := substr(l_str,instr(l_str,p_sep)+1);
    15      end loop;
    16      return l_tabstr;
    17  end;
    18  /
    Function created.Then you can use these in either regular sql.
    SQL> var s varchar2(100)
    SQL> exec :s := 'Smith,Scott,Miller'
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from emp where ename in
      2      (select upper(column_value) from table(tabstr(:s)));
    EMPNO ENAME    JOB          MGR HIREDATE     SAL   COMM  DEPTNO
      7369 SMITH    CLERK       7902 17-DEC-80    800             20
      7788 SCOTT    ANALYST     7566 09-DEC-82   3000             20
      7934 MILLER   CLERK       7782 23-JAN-82   1300             10Or in pl/sql.
    SQL> var c refcursor
    SQL> begin
      2      open :c for
      3      select * from emp where ename in
      4          (select upper(column_value) from table(tabstr(:s)));
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> print c
    EMPNO ENAME    JOB          MGR HIREDATE     SAL   COMM  DEPTNO
      7369 SMITH    CLERK       7902 17-DEC-80    800             20
      7788 SCOTT    ANALYST     7566 09-DEC-82   3000             20
      7934 MILLER   CLERK       7782 23-JAN-82   1300             10

  • Can't find the variable used in Apex using Substitution String #

    Hi,
    Someone put in a substitution string for a user defined variable. #variable#. I can't find it. Looked through the shared components. Any advice? Thanks.

    Export your application and use a good text editor to search on that string and you will find it if it is there.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for