UI Template Substitution tags in a procedure

Version: 10.1.4
Is it possible to use Substitution tags in a procedure and call the procedure with in the UI template?
So the UI template will be:
<ORACLE>
BEGIN
Schema.procedureName;
END;
</ORACLE>
The procedure will be:
PROCEDURE procedureName as
BEGIN
htp.p('#USER.FULLNAME#');
END;
This way all the logic can be built in the procedure (taking advantage of the Substitution tags).
When I tried the above the Substitution tag is not rendered as it supposed to (display the User Full Name), but just displays it as raw HTML.
Is it possible/viable to use Substitution tags outside UI Templates?
Thanks.

The specific example you are asking about could also be implemented without substitution tags. The following is from a pl/sql item I added in my footer. Hope it's of use to you:
declare
l_person_rec wwsec_person%rowtype;
begin
htp.print('<div class=PortletText1>');
l_person_rec := wwsec_api.person_info( wwctx_api.get_user_id() );
if (l_person_rec.first_name = 'PUBLIC') then
   htp.print(l_person_rec.first_name);
else
   htp.print(l_person_rec.first_name || ' ' || l_person_rec.last_name);
end if;
begin
   htp.print('(' || wwsec_api.group_info(wwsec_api.get_defaultgroup()).name ||
exception when others then
   null;
end;
htp.print('</div>');
end;

Similar Messages

  • User interface template substitution tags problem

    Portal 9.0.2.0.3 (Upgraded from 9.0.2.2.14A)
    Hi all,
    I am designing an unstructured user interface for use with my portal reports.
    I have located a help document called 'Unstructured user interface template substitution tags' from the standard portal help pages.
    My problem is that only a few of these tags are actually being substituted for their correct values when I run my reports. For example the help document says the #PAGE.CUSTOMIZEPAGE# tag should be substituted with HTML text hyperlink to the customize page dialog. On my report this tag and the majority of others are substituted with a blank line.
    Any ideas?

    Same problem exists with the #TITLE# tag. However, SOMETIMES (I don't know how or why) the tag shows up. If I find out what the secret is, I'll let you know.
    Anyone else have any input?
    Pat Murray

  • Unstructured user interface template substitution tags

    Does anyone know where I can find a full list of substitution tags. An example of the tags I am talking about would be #BODY#

    Click on the help link in Portal and search on:
    template substitution tags
    The link should provide you with a table of all supported #tags#.
    Thanks,
    Candace

  • Unstructured UI Template Substitution tags - PROBLEM

    Hello
    I'm trying to make a UI Template, but are having problems with the substitution tags.
    I want to make a home-link, but with my own text such as "Take me home"
    I've tried this approach:
    Take me home
    But as a result i get the standard icon for home, with the text "Home" under it
    Can someone give me a hint how to solve this?
    Regards
    Per-Jarle

    Hi,
    Looks like you are doing something wrong. Try something like this.
    <HTML dir=#DIRECTION#>
    <HEAD>
    <TITLE>#TITLE#</TITLE>
    </HEAD>
    <BODY leftMargin="0" rightMargin="0" topMargin="0" marginheight="0" marginwidth="0" class="PageBG">
    oracle
    <TABLE >
    <TR>
    <TD><IMG SRC="#IMAGE_PREFIX#pobtrans.gif" BORDER="0" WIDTH="0" HEIGHT="4"></TD>
    </TR>
    </TABLE>
    #PAGE.SUBPAGELINKS#
    #BODY#
    </BODY>
    </HTML>
    A home link will appear which will take you to oracle.
    Thanks,
    Sharmila

  • Substitution tags

    All,
    The list of "unstructured user interface template substitution tags" in the 3.0.8 online help is not complete, and it contains errors. Examples:
    #PAGE.SUBPAGELINKS# is not documented.
    #BANNER.NAVIGATION# should read #BANNER.NAVIGATOR#
    #BANNER.CUSTPAGE# should read #BANNER.CUSTOMIZEPAGE#
    Is updated documentation available? If not, please provide the information that you have.
    Thanks,
    Erik Hagen

    See http://hvirring.dk/portal/substitutiontags.asp for an updated "Unstructured user interface template substitution tags" help file (/help/wvttmptg.htm)
    /Jesper

  • #PAGE.CUSTOMIZEPAGE# substitution tag problem on template based pages

    I've created an Unstructured UI template that includes the #PAGE.CUSTOMIZEPAGE# substitution tag.
    It works fine on a normal page, but it doesn't render the 'Customize' link if the page is based on a template. I know that I am authorized to customize the page, because a Portal Smart Link on the same page allows me to do just that. Does anybody know whether there are any issues with this substitution tag on template based pages? (I've used the #PAGE.EDITPAGE# tag in the same Unstructured UI Template with no problems on either normal, or template based pages.)
    Oracle Portal Version 10.1.2.0.2.
    I started this thread on the Portal - General forum, but now realise it's more relevant here.
    Original thread: Customize Page link not rendered on template-based sub page.
    Thanks
    Matthew

    Just a guess, but it seems that the site uses server side includes (the shtml extension and there is a ssi include in your template). You will probably need a testserver running (like XAMPP) on your local system to preview this in a browser.
    Grtz

  • PL/SQL for Items / Substitution Tags

    Is there any documentation listing how to retrieve the label / value / style for items (such as portal smart links) and substitution tags (used in page and content templates) using PL/SQL?
    For me, using items is good just to get something up and running, but I find I just don't have enough control over the final look and feel (all those TABLE/TR/TDs just kill me!) to produce a quality result. I'm thinking of something like the instant portal, which looks great, but AFAIK is entirely coded in custom PL/SQL.
    I've seen a few posts relating to "how do I get the XXX field", such as this one: Re: User first name, last name Information in welcome message so I guess there are some other users out there with the same problem.
    If this doco does not exist anywhere, maybe we could start a thread here (or on a wiki somewhere???) and people could add individual cases as they use them, and that way build up a quick reference for anyone to use.
    Cheers,
    Barney

    <No idea what happened to the formatting there - same post again>
    Nope - saw that.
    As I understand it, these are only available within either page templates or content layout templates. For instance, I can't even see a way to produce the simplest of welcome strings:
    Welcome #USER.FULLNAME# (#USER#)
    (and I'd really like it if #USER# returned the user id in the case it is stored in the OID, rather than converting it to upper case!)
    I can try to construct this out of items, but then I end up in a table/tr/td formatting hell.
    In this specific case, I can achieve this by constructing a content layout which displays this HTML but not the actual item content, and using it in a region with a single dummy item (the USER fields are not documented in the content layout section, but do appear to work), but then try to add the logout URL to the mix and I'm stuck again.
    Two solutions spring to mind to make this work:
    1. Improve the HTML Portlet to understand / translate these substitution tags
    2. Document how/where to get the info from. It's all on the database somewhere, and hence accessible via PL/SQL items.
    I don't hold out much hope of seeing (1) in the near future, so was going for (2).
    Cheers,
    Barney

  • HTML content layout substitution tags

    Hi,
    We have a multi-language Portal 10.1.4 and use HTML content layout substitution tags in a HTML Template. The problem is that we would like to use the ITEM.PUBLISHDATE.LABEL and the ITEM.UPDATESDATE.LABEL tags but the text rendered isn't exactly what we would like to get (f.e. in English it's 'Publish Date' and in French it's 'Date de mise à jour').
    I looked in the documentation and found that the text rendered correspond to the display name of the attribut (not 100% sure of this). But, those attributs are in the Shared Objects and we can't modify them.
    1. We would like to modify the display name of those attributs (both in French and in English) or find any other way to make it.
    2. We also want to apply an other format to the date retreived with the ITEM.PUBLISHDATE.VALUE and the ITEM.UPDATEDDATE.VALUE tags.
    Can someone help us with those issues ?
    David

    Yes, we added languages in the Translation tab of the shared object pagegroup properties.

  • Portal Substitution Tags

    I am having some troubles getting the #USER.FULLNAME# tag to work on my template. Doesn't mater what I tried the tag won't display any value. I made sure the user last name and first name were populated from looking at the WWSEC_PERSON$ table (both portal30 and portal30_sso schema). Is this a bug?
    I am also interested to find out if there is a way I can create user-defined substitution tags. I sure can use the user-defined substitution tags on many instances.
    Thanks

    Hi,
    This was a bug(replacement of fullname) which has been fixed in the 30984 patch release.
    You cannot declare your own tags but you could use the already existing ones provided.See the context help for a list of tags ,portal supports.
    Thanks,
    Anu

  • Substitution tags value

    Hi,
    can I get the substitution tags value used by template
    and assign this to a variable defined in a Unstructured template?
    My problem is to manage a conditioned exit action
    from a reports chain called by several Dynamic Pages
    thanks
    Giovanna

    Hi,
    You can use substitution tags only in unstructured templates. You cannot use them in dynamic pages.
    Thanks,
    Sharmila

  • Substitution tags in portal ver.2

    Could anyone tell me if are the substituion tags (like #BANNER.GREETING.LABEL#) which were used in oracle portal version 1 (3.0.9) supported in oracle portal version 2 (9.0.2)?
    Thanx a lot.

    You can use substitution tags in Unstructured UI templates and then use the templates in pages and other components. Go to templates from
    Navigator->Providers->Shared Components->Templates

  • Template Substitutions

    I've just hit the problem described in this thread:
    Vertical right-hand tabs
    regarding #TAB_CELLS# substitution being made only before #BOX_BODY#.
    Did this turn out to be by design or is it an issue?
    I've been interested in several threads relating to template substitutions, which spark the following questions:
    Are all of the restrictions on which substitutions are supported "by design"?
    Are they for underlying technical reasons or following more abitrary reasoning?
    Are these restrictions likely to be changed in future releases?
    I'm particularly interested in: #TAB_CELLS# not being restricted by #BOX_BODY# placement; #TITLE# being available anywhere in the page; #PAGINATION# etc "Before Rows" to allow pagination controls in <thead>/<tfoot> elements.

    Hello,
    It's designed that way, since 99% of the time that's how it's used.
    If you are trying to place content regions above tabs I suggest you use one of the #REGION_POSITION_NN# substitutions.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Generating xml tags with stored procedure

    Hi Friends,
    I have to create a xml report using procedure .the code is given here to generate xml tags.
    create or replace procedure sri_xml (errbuff out varchar2,
    retcode out number) as
    /* create cursor to fetch the records*/
    cursor c_emp is select empno,
    ename,
    deptno,
    sal,
    job
    from emp;
    begin
    /* first line of xml data should be "<? xml version = "0.1"?>" */
    fnd_file.put_line(fnd_file.output,'<?xml version = "1.0" ?>');
    fnd_file.put_line(fnd_file.output,'<per_emp1>');
    for c in c_emp loop
    /* for each record create a group tag <gemp_name> at start */
    fnd_file.put_line(fnd_file.output,'<G_EMP_NAME>');
    /*EMBEDD DATA BETWEEN XML TAGS */
    fnd_file.put_line(fnd_file.output,'<empno>' || c.empno || '</empno>');
    fnd_file.put_line(fnd_file.output,'<ename>' || c.ename || '</ename>');
    fnd_file.put_line(fnd_file.output,'<sal>' || c.sal || '</sal>');
    fnd_file.put_line(fnd_file.output,'</G_EMP_NAME>');
    end loop;
    fnd_file.put_line(fnd_file.output,'</per_emp1>');
    end;
    i run the procedure in the concurrent program with output mode as text and i got the xml tags as the out put. i have created the template using the data definition and registered them in the xml publisher administer but i am unable to get the out put when i run the concurrent request it is giving the message "AUTHENTICATION FAILED".
    please help me to solve the problem and to get the desired output with desired template.
    thanks in advance,
    siddam

    Hi Siddam,
    Please post your query on BI Publisher forum.
    There are number of folks who can resolve the issue u faced.
    Please go through the bi publisher developers guide and then design the report.
    I am not sure about the process ur following for report development...i think you have to create data defination and rtf layout and then attach it to oracle xml administrator responsibility.
    Ratnesh

  • Bolding rows in RTF template using tags

    In an rtf template, is there a way to bold an entire row in the table using tags rather than building two rows (one bold, one unbold) and put them in a if condition?
    if
    [BOLD ROW]
    else
    [UNBOLD ROW]
    end if

    This should do it
    <?if@row:number(EMPNUM)=10003?>
    <?attribute@incontext:font-weight;'bold'?>
    <?end if?>
    slot this into a cell on the table row
    Tim

  • 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.

Maybe you are looking for

  • Multiple Hard Drive Failures

    I purchased a MacBook Pro just before last Christmas and in late January or early February the hard drive failed and had to be replaced. I was told then that it was a fluke and not to worry about it that the chances of it happening again were very sl

  • Camera to video switch is missing

    I got my iPhone 4 just last week and in the camera it had a switch in the bottom right hand corner to switch from using camera to video. Now the switch is missing and I would like to know how to fix it??

  • Need help on RAALTD01and RAALTD11 programs

    Hi friends, My requirement after translating data coming from legacy system is : "After the translation, the asset master data and value must be posted to the sub-ledger using the SAP function “Legacy asset takeover, with the transaction code AS91. T

  • Regarding RFID Design

    We are on way to implement WM(Warehouse management)module from the scratch along with the RF functionality(Mobile data entry) in one of our ware house....project time line is 4 months to go live and we are at design stage now.. Need your guidance on

  • HOST command in Forms9.0.4 versions with 10g

    Hi, We are currently running forms6i(character based) on a unix m/c . While trying to upgrade to forms9i (web based) , we find that the HOST command used to call shell script is not wrking and also it doen't shows any errors during compilation or run