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

Similar Messages

  • Static Substitution Strings

    Folks,
    Is it possible to reference a Static Substitution String in a region title?
    thanks
    KIM

    Thanks again Scott,
    Yes I had tried but without the '.' after &name. Had not used these before. Actually, just below the Static Substitution Strings definitions it says:
    "Substitution strings are strings that you can define at design time. So for example if you want to reference &MY_VARIABLE and have it replaced with SOME VALUE then enter MY_VARIABLE in the Substitution String column and SOME VALUE in the Substitution Value column."
    A '.' after '&MY_VARIABLE' might be useful. Something for the next release?
    Cheers
    KIM

  • Substitution-Strings in external JS-Files

    Hi, can anybody tell me how to include external JavaScript-Files? When loading them in "Static-Files" Substitution-Strings like "#WORKSPACE_IMAGES#" or "&WORKSPACE_IMAGES." are not working. Thanks for your help!

    Hi,
    This is known limitation. See these posts
    referencing workspace image in CSS file
    Re: How to reference CSS in a template
    2.2 uploaded css files, images and substitution strings
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Substitution strings not working in URLs for web service references (bug?)

    We have an environment where the url for our BPEL server is read from a variable. I've created an application item and a corresponding application-level computation. I'm using the ampersand-followed-by-dot (&BPEL_SERVER.) syntax as well as the hashmark syntax (#BPEL_SERVER#) and am unable to get this working.
    Is there a way for me to debug web service reference calls other than whether a call was successful? Is this a bug?
    edit:
    Here is the error message I get when I try to use a substitution:
    ORA-20001: The webservice was unreachable because either the URL you supplied was invalid, your environment requires a valid proxy server address for HTTP requests, or a wallet needs to be configured for HTTPS requests.

    No problem - let me try to lay this out a little differently, perhaps I'm just missing something.
    problem:
    * we have separate development, test, and production servers for our database and bpel servers.
    * The hostnames for these servers are stored in a table of key/value pairs
    * This means that (by policy) the hostnames in URLs calling BPEL web services should be the value corresponding to BPEL_SERVER so that the appropriate bpel server is used to call the web service
    attempted solution:
    1) I created an application item named BPEL_SERVER
    2) I have a before-header computation that sets BPEL_SERVER to 'http://bpeldev' using a static value assignment
    3) I have a web service reference whose URL is either &BPEL_SERVER./orabpel/default/callNotification/1.0 or #BPEL_SERVER#/orabpel/default/callNotification/1.0
    4) The web service reference is called in an after-submit process.
    5) An invalid URL exception is thrown for this process.when submitting on the page containing this process
    observations:
    * for (3) - I can set the URL to http://bpeldev/orabpel/default/callNotification/1.0 and everything occurs successfully
    * for (3) - If I use http://bpeldev/&BPEL_SERVER. then when I execute (4), I see a request for the exact string http://bpeldev/&BPEL_SERVER. in bpeldev's access logs
    * for (3) - If I use http://bpeldev/#BPEL_SERVER# then when I execute (4), I see a request for the exact string http://bpeldev/#BPEL_SERVER# in bpeldev's access logs
    * for (2) I've also used a function call RETURN get_const_value('BPEL_SERVER'); - same results for (5)
    * the item value has ben verified before (5)
    * for (1) and (2) I've tried defining substitution strings in the application definition instead - same results for (5)

  • Dynamic substitution strings.

    Hello Marvel team,
    I need to calculate 3 values using an SQL query, theses values will be used with a lot of pages.
    I am asking, how and where can I create theses fields like substitution string but not static.
    Can I use page0 ?
    Thanks for any help.
    Jina.

    Jina - Create a page or application item and a create a computation that sets the item. It could fire once per session (on new instance) or based on some other condition so that it fires only once, e.g., when the item is null. Then reference the item like any other item (&ITEM., :ITEM, or v('ITEM')).
    Scott

  • 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

  • Can substitution strings be changed at runtime?

    I need to deploy my application such that it can run with different sets of tables, which are otherwise identical in design.
    My client has multiple versions of the tables. For instance, they may have
    CHICAGO.EMPLOYEES
    CHICAGO.DEPARTMENTS
    or
    LONDON.EMPLOYEES
    LONDON.DEPARTMENTS
    or even
    CHICAGO.EMPLOYEES_V01
    CHIGAGO.DEPARTMENTS_V01
    I can of course create a separate installation for each one of these, but this is neither elegant nor efficient.
    Is there I way I can have a UNIQUE APEX application installation and then use substitution strings to switch between variants?
    Ideally, I should modify the LOGIN screen adding two new fields, Location and Version and then designate the tables as
    $LOCATION..EMPLOYEES_$VERSION.
    $LOCATION..DEPARTMENTS_$VERSION
    This means that I need to retrieve the two variables at login and then use them to help point to the right tables.
    I know about substitution strings, but as far as I am aware they can only be changed statically during the development. Is it possible to change them at runtime? If yes, how?
    I would greatly appreciate any response.
    Mike

    Hello Mike,
    If your location is equivalent to the parsing schema you can use the APEX built-in substitution string *#OWNER#*.
    You still need to resort to Peter’s advices where dynamic table names are concerned. Bear in mind that in this case, you won’t be able to use the APEX built-in DML processes, and you’ll need to write your own fetch/insert/update/delete processes, which might be a lot of work. Working in a multi-user environment adds the complexity factor of concurrency control (lost updates).
    Regards,
    Arie.
    ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    ♦ Author of Oracle Application Express 3.2 – The Essentials and More

  • How/where are substitution strings defined in 4.1?

    There used to be a way to define substitution strings in Apex, but since upgrading to 4.1, I am unable to find. I have two different paths for generating reports depending on the environment (test or prod) that I am using and want a simple way of substituting those path names. thanks!

    KarenH wrote:\
    There used to be a way to define substitution strings in ApexThe static Substitutions section in the Application Definition?
    but since upgrading to 4.1, I am unable to find.Home > Application Builder > Application > Edit Application Definition
    i.e. click the Edit Application Properties button on the application home page.

  • Report template substitution strings?  (APEX 2.2.0)

    Hi all,
    I am trying to customize a report template. I would like to know if there is a way to get the sort link that goes into the column headers. The next page and previous page links have the #LINK# substitution string. #COLUMN_HEADER# doesn't give me enough flexibility.
    Would I have to use a named column template for this? (I don't have much idea what that is. I read about it on Scott Spendolini's blog entry on "Click in a Row".)
    Cheers!

    Hello,
    >> I could using JavaScript rewrite the column header to be what I want after the page renders, but I'd rather it show up the way I want in the first place
    Can you be more specific about what is it that you want? The report engine allows you to use custom headings. Can’t that feature help you achieve what you want?
    >> Is there a list of the substitutions strings that are available to the column header?
    The substitution strings you see on the templates populated by the APEX engine with snippets of code you can’t control. You can define your own substitution strings, in the application definition page (under shared components), set them with the code you need, and use them throughout the application, including in templates. The way to use them is a bit different – instead of the “#STRING# syntax, you need to use the “&STRING.” Syntax.
    Regards,
    Arie.

  • 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

  • Feature Request - show substitution string values in session state display

    Hi!
    I would like to request that in addition to page and application items and session state values that the value of substitution string values be shown. Another option would be to have a separate link (like session) to display them. This would allow developers to see all of the available substitution values and how they change across pages, etc.
    Thanks!
    Dave Venus

    Dave - What are some examples of values that you are not seeing in the session state report that would be useful?
    Scott

  • 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

  • Substitution String in Row Template order dependant

    Hi Folks,
    This questions is related to an earlier Complex Detail Report Layout: Can it be done? about building a complex row template (thanks for your help, Vikas!).<br><br>
    Having built the row template (Named Columns) and tested it in a separate application, I have been preparing to incorporate it into the target application. (Here's a screen shot of the work in progress.) I decided to see if I could use column aliases with the substitution strings and so added an alias to the query for the report.<br><br>
    Strange values appeared (like a "Y" for a Project Name) and initially I thought the aliases wouldn't work, so I backed the change out. However, it was now quite apparent that the substitution strings were not taking their values from the column names, as I expected. I was able to put the values in the correct place by modifying the order of the columns selected in the query.<br><br>
    Am I misunderstanding? Shouldn't the order of the columns in the select statement be irrelevant when named columns are used? <br><br>
    Since the order in the query is NOT the order displayed in the template, and I have nearly 30 fields, (many of which are dates, and I couldn't possible guess which is which if the substitution doesn't work properly), it seems important to understand how to ensure the proper values appear in the report.<br><br>
    Many thanks for your help,<br><br>
    Petie

    I take it back. This is whacked. Please take a look at the picture (http://tinypic.com/view/?pic=nygyu0)
    OK, I had a select statement:
    select ps.project_name, ps.project_manager,  ps.gts_dependant, ps.gxp_relevant from project_status ps, eprs_program p
    where
    ps.program_id = p.id and
    p.program_number = :P6_PROGRAM_NUMBERThis populated the fields #PROJECT_NAME#, #PROJECT_MANAGER#, etc. properly.
    I even switched the order around and put the ps.project_manager ahead of the ps.project_name and template still worked.
    I restored the order and checked again. All is good.
    I changed the query and added an alias like so:
    select ps.project_name as "PROJ_NAME", ps.project_manager,  ps.gts_dependant, ps.gxp_relevant from ...The report showed the substitution string "#PROJECT_NAME#" (as expected, because the column was now aliased.) So this is good.
    I went to the row template definition and changed the substitution string #PROJECT_NAME# to #PROJ_NAME# to match the query -- and the substitution strings broke again!
    The report template now behaves as described earlier; being position dependant. Now I suspect that this is a bug, and not something caused by my mucking around.
    I would greatly appreciate your thoughts on the matter and potential workaround. At this point, I will likely delete the region and try creating a new region. I would hate to loose the whole page, the top part was a lot of effort. <sigh>
    Thanks,
    Petie

  • 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

  • Query stats substitution strings on IR region

    Hello,
    Are the query stats substitution strings, like #ROWS_FETCHED#, #TOTAL_ROWS#, #FIRST_ROW_FETCHED# and #LAST_ROW_FETCHED#, should be active in an IR region?
    Currently, it seems they are not active, and I’m asking if it’s intentional or a bug.
    Thanks,
    Arie.

    Hi Marco,
    Thanks on your reply, and the enhancement request.
    In the meantime, can you think of a work around? I’m trying to derived a row (serial) index on a paginated view, using ROWNUM. In classic report, you can subtract the current ROWNUM from the #FIRST_ROW_FETCHED#.
    Thanks,
    Arie.

Maybe you are looking for