Assign value to page item on log-in

For some reason I cannot seem to solve this simple issue. I have a SQL report on a page with several text boxes that are used for selection criteria.
So, for instance -- I have a text box (P1_TEXT) and my SQL for the report is:
select * FROM table
where table.field LIKE :P1_TEXT
I want to set the default value (hidden) of that text box to '%', so they see all records when they log-in.
I have tried PL/SQL processes (On New Instance) with
:P1_TEXT = '%';
but that doesn't seem to work. I have also set the default value on the text box itself, but that doesn't seem to work as well.
Please help.

What if you changed your query to something like:
select * FROM table
where table.field LIKE :P1_TEXT || '%'Or you could use NVL(:P1_TEXT, '%'), though you're probably going to want to append '%' in any case, so the first example is probably best for all-around use.
Good luck,
Stew
My Oracle Community blog:
http://www.oraclecommunity.net/profiles/blog/list?user=stewstryker

Similar Messages

  • Before Header pl/sql process to assign values to page items

    How can i assign values to items on a page based on the data structure returned from a pl/sql procedure within the before header process? I am thinking of executing a pl/sql procedure based on a URL parameter value and then assign values to page items. Is this really possible using Apex 4.0.2? If yes, how can it be done?
    thanks
    Seetharaman

    The question isn't really clear. What kind of "data structure returned from a pl/sql procedure"? Please be much more specific.
    For a PL/SQL data structure such as record containing 2 elements (<tt>x</tt> and <tt>y</tt>) returned as an out parameter from a procedure to be assigned to 2 page items <tt>p1_x</tt> and <tt>p1_y</tt>, all that's required in the Before Header process is something like
    declare
      l_rec rec_type;
    begin
      the_proc(..., p_out => l_rec, ...);
      :p1_x := l_rec.x;
      :p1_y := l_rec.y;
    end;

  • Error assigning value to page item

    I create a "SQL Query (Pl/Sql Function Body Returning
    Sql Query)" region, and also an item on the page called
    :P1_TEST.
    In the Region Source for the region, I have the following
    codes:
    declare l_sql varchar2(32676);
    BEGIN
    :P1_TEST := 0;
    l_sql := 'select emp_id from emp';
    return l_sql;
    END;
    When I click on "Apply Change" button, I got the
    following error:
    ERR-1002 Unable to find item ID for item "P1_TEST" in application "4000".
    Any reason why I got the error?

    Re: how to get the parsed  last query (report)

  • Assigning value to an item

    Is there a way to assign value to variable
    of data type ITEM? In other words, I need to
    assign value to an item, where I just know the
    it_id.
    In the following procedure p_item is unknown until runtime;
    and if it_id is not null then assign some value to the item.
    procedure update_item(p_item)
    is
    it_id item := find_item('block1.'||p_item);
    if not id_null(it_id) then
       it_id := 'some_value';  --doesn't work.
    end if;
    end;

    Do you mean you know the name of the item and you want to then assign a value?
    If so then use the COPY command which allows you to assign a value to a named variable
    e.g.
    COPY (12345, 'blocka.number_item1');
    To read the value in the same way use the NAME_IN function.
    There is plenty in the forms helps about this.
    Mark

  • How to fetch the tabular form column value into page items

    Hi,
    I have created tabular form. I have set LOV for one column. Here my requirement is when i select the value from lov then it will fetch that value into page item.
    can any help?
    I am using apex 4.1
    Thanks
    vijay

    It's not so easy to make a dynamic action on a tabular form.
    The best thing you can do is to use the javascript API from APEX: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm
    So if you have a tabular form then open your item and make it a column link.
    In the link location select URL.
    Your URL would be something like this
    javascript:$s('P1_PAGE_ITEM', #COLUMN_ID#);doSubmit('COLUMN_ID');The doSubmit is not required but if you don't submit your page then the server would never know about your page item.
    Off course it is possible to submit at a later point. For example you can just use the $s to set the value off an item and afterwards create a button that would submit your page.
    Be aware that if you just set the value off your page item and just link to an other page without submitting or without branching that other page would never know about your page item.
    If you want the server to know the value off a page item you need to submit it's value to the server. The easiest way is just to do the doSubmit() call after you have set your value.
    Hope this helps,
    Regards
    Nico

  • Assign values for Application items

    Hi,
    I have some application items to which I want to assign values querying from a database table based on the user logged in. I have created an application process which does that. What process point I need to select so that the values in application items are available through out the session?
    Thanks,
    Asha

    Asha:
    I have been able to reproduce this issue. The application process appears to fire for every 'new' session-id. This explains the 'no data found' when you navigate to the application's login page. What is weirder is that APEX re-uses the session-id created when presenting the login page and therefore the application process no longer fires ! This needs more research. Clearly, my understanding of the the 'On New Session - After Authentication' is inadequate.
    In the meanwhile you can move the code you have for the application process and and use it as a 'Post-Authentication Process' for the application's authentication scheme.
    Varad

  • How to Set Value of page item?

    String dimLayoutNew[][] = new String[3][];
    dimLayoutNew[0] = new String[1];
    dimLayoutNew[1] = new String[1];
    dimLayoutNew[2] = new String[2];
    dimLayoutNew[0][0] = measureString;
    dimLayoutNew[1][0] = strDimension1;
    dimLayoutNew[2][0] = strDimension2;
    dimLayoutNew[2][1] = strDimension3;
    Boolean applyNewLayoutFlag = tableQuery.layout(dimLayoutNew);
    In this Layout,How to set the value of strDimension2 page item to one member of strDimension2?
    thanks!

    what about this - look up the javadoc to get more >info ....You would have to admit, while BI Beans are great, the documentation is a little light.
    int targetHPos[] = targetDataAccess.getEdgeCurrentHPos (2);
    now apply the order to the targethpos as you like...now, once you make your changes to the targetHPos, how does one actually make the change to the Query object (i.e. what method does one need to call to pass the new targetHPos in??) I looked through the JavaDoc and didn't see a SetCurrentHPos or equivalent function in the DataAccess Class. Is there one?
    Also, what role, if any, should the SetCurrentPage method of the query object play if I'm not using it correctly?

  • List of Values using page item variable

    I know there has to be a simple solution to my problem but I cannot figure it out. Any assistance would be greatly appreciated.
    I have a Shared list of values that I want to reuse on several of my pages. I have tried (I thought) all the variable possibilities but cannot figure out how to reference the page item in my list of values.
    Original code:
    select app_name d, app_sys_id f
    from ops_application
    where :P32_RADIO2 = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where :P32_RADIO2 = 'Database'
    Doesn't work:
    select app_name d, app_sys_id f
    from ops_application
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Database'
    I also have tried 'P'||v('APP_PAGE_ID')||'_RADIO'
    'P'||&APP_PAGE_ID.||'_RADIO'
    'P&APP_PAGE_ID._RADIO'
    'P'||:APP_PAGE_ID||'_RADIO'
    Thanks,
    Gayle
    Edited by: user8116955 on Sep 27, 2010 12:25 PM

    Gayle,
    I haven't tried this, but what about
    where v('P'||:APP_PAGE_ID||'_RADIO') = 'Application'That should allow you to build up the name of the page item dynamically, and then test the value...
    A lower-quality solution would be to use an application item rather than a page item, as then you'd know the name ahead of time.
    Let me know if this works,
    -David

  • How to set the default value for page item in report

    Hi Gurus
    I currently i have company name as page item in one of my report screen ,but it is displaying the value for company name in its drop down column ,but i want to make it "*ALL* as default after the query result ",this is user requirement ,please share ,how can i make it ,is it possible ??,thanx in advance
    thanx
    Pratap

    Hi,
    I don't think this is possible. You can of course use a parameter to select the page item and default the parameter but then the user will have to rerun the report to see other pages items.
    Rod West

  • Default Value for Page Items

    Hi,
    I use page items quite heavily in my workbooks to allow the user to filter the recordsets as they require.
    Some of these page items are based on dates - i.e. Extract Date (my underlying tables are updated on a daily basis, so the Extract Date soon contains several values).
    Is there any way I can set the Page Item to show the latest (MAX) Extract Date when the work book is opened?
    Many thanks
    Mark

    Hi all
    Also, when alternate sorts are in use these will generally trigger Discoverer to add the NOREWRITE hint to the SQL, which can cause horribly slow performance.
    I used to use alternate sorts a lot but these days I use them very sparingly. When I want a list of values to come up in a certain order I now use a custom folder and add the ORDER BY in there. This allows the list to come up right when my users are picking and stops the NOREWRITE hint, but it also removes the alternate sorting from the display.
    There are other causes for the inclusion of NOREWRITE hint but this is the main one.
    Best wishes
    Michael

  • How to reference SQL column value for  page item text field

    greetings,
    I created a simple report based on sql query. the query is select employeeid,salary from emp_tbl. under the report column i see employeeid and salary. I created a page item text field with the source type pl/sql function body. inside this source is simple block.
    begin
    if salary < 10000 then
    return (1);
    else
    return (2);
    end if;
    end;
    from the error i take it that it doesn't understand salary. I have tried bind variable (:salary) , hash marks (#salary#), ampersand (&salary.) but nothing works. Is this even possible?
    thank you,
    mon

    Hi Mon,
    I think you will find that anything you do in Forms, you can achieve in Apex, but you may have to think a little differently. Finding direct equivalents in both environments may not be easy or even possible in some circumstances, but with a little knowledge and thought an equivalent overall business flow can be achieved that is just as efficient.
    For example, in Forms where you have a multi row block based on a table, if you need to add any derived fields then you will add these at the block level. I can see that this is what you are trying to achieve in Apex.
    In Apex this will be more easily achieved by specifying the derived fields as part of the query for the region, and if the derivation of the fields is complex you can use user defined functions. If you require page type items to be displayed such as text boxes, LOV's, radiogroups, datepickers etc then these can be embedded in the query with the use of the Apex API, see the APEX_ITEM supplied package.
    I know this is still very high level, but I hope it helps you on your way in your journey with Apex.
    Regards
    Andre

  • Show Value Page item

    I'm using the following code for my news ticker. I want to display the value of page item :P18_TEKST. But the page shows the text :P18_TEKST. How do i get the value of the page item in my ticker. See the code below
    It's about the row: var marqueecontent='<nobr><font face="Arial"><b>:P18_TEKST<b/></font></nobr>'
    <script language="JavaScript1.2">
    //Specify the marquee's width (in pixels)
    var marqueewidth="350px"
    //Specify the marquee's height
    var marqueeheight="20px"
    //Specify the marquee's marquee speed (larger is faster 1-10)
    var marqueespeed=2
    //configure background color:
    var marqueebgcolor="#ededd6"
    //Pause marquee onMousever (0=no. 1=yes)?
    var pauseit=1
    //Specify the marquee's content (don't delete <nobr> tag)
    //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
    //var marqueecontent='<nobr><font face="Arial"><b>This is where my text goes.<b/></font></nobr>'
    var marqueecontent='<nobr><font face="Arial"><b>:P18_TEKST<b/></font></nobr>'
    marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
    var copyspeed=marqueespeed
    var pausespeed=(pauseit==0)? copyspeed: 0
    var iedom=document.all||document.getElementById
    if (iedom)
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
    var actualwidth=''
    var cross_marquee, ns_marquee
    function populate(){
    if (iedom){
    cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
    cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
    cross_marquee.innerHTML=marqueecontent
    actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
    else if (document.layers){
    ns_marquee=document.ns_marquee.document.ns_marquee2
    ns_marquee.left=parseInt(marqueewidth)+8
    ns_marquee.document.write(marqueecontent)
    ns_marquee.document.close()
    actualwidth=ns_marquee.document.width
    lefttime=setInterval("scrollmarquee()",20)
    window.onload=populate
    function scrollmarquee(){
    if (iedom){
    if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
    cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
    else
    cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
    else if (document.layers){
    if (ns_marquee.left>(actualwidth*(-1)+8))
    ns_marquee.left-=copyspeed
    else
    ns_marquee.left=parseInt(marqueewidth)+8
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
    write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
    write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
    write('</div></div>')
    else if (document.layers){
    write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
    write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
    write('</ilayer>')
    document.write('</td></table>')
    </script>Edited by: user565199 on 14-mei-2010 3:06
    Edited by: user565199 on 14-mei-2010 3:09

    Hi
    Try changing this...
    var marqueecontent='<nobr><font face="Arial"><b>:P18_TEKST<b/></font></nobr>'To this...
    var marqueecontent='<nobr><font face="Arial"><b>' + document.getElementById('P18_TEKST').value + '<b/></font></nobr>'(not tested but you get the idea.)
    Cheers
    Ben

  • Discoverer Report: Select all values for a Page Item

    Hi Guys
    I have created a Disco Report which has one Page Item.
    It populates all columns based on values I select for Page Item that is perfectly fine.
    How do I Display column values for all possible values of Page Item?
    Is thera ny way I can have Option to select All possible values for Page Item?
    Cheers
    Vijay

    Hi Vijay
    Just to confirm what Rod has said, this capability to manage ALL in Page Items was introduced as part of 10.1.2 and has been maintained into 10.1.2.3 and 11g. It will not be back ported to previous releases.
    Best wishes
    Michael

  • Assigning values to 2 fields using sql statement

    db11g , apex 4.0 and firefox 24 ,
    hi all ,
    i am trying to follow this tutorial to assign values to 2 items on a page using sql statement ,
    and i am using the same sql statement the tutorial uses
    select d.loc location, count(e.empno) num_employees from dept d, emp e where d.deptno = e.deptno(+) and d.deptno = :P3_DEPTNO group by d.loc -- btw , what does the "+" sign mean?
    after the e.deptno in the where condition .
    but i am facing this error
    1 error has occurred
    Wrong number of columns selected in the SQL query. See Help of attribute for details.
    and it does not work with two columns in the select statement under any conditions , i tried to remove the group function and the group clause ,
    it does not work unless i use only one column in the select statement ??
    thanks

    Pars
    And how exactly is this rewrite of the sql statement resolving the OP's issue.
    You are still using more than 1 column which will still result in the error message:
    Wrong number of columns selected in the SQL query.
    As mentioned in my earlier post APEX 4.0 (the version the OP is using) does not handle a sql statement with multiple columns for the dynamic action Set Value.
    Which means the fastest  and simplest solution is splitting up the dynamic action in multiple Set Value actions.
    Using this plugin or upgrade to a newer apex version would also be a possibility.
    Nicolette

  • Problem in displaying selected page items in the title in Graph

    Hi There;
    I have a problem in displaying selected value of named page item in the graphs.
    Eg. I have in my worksheet a page item named "Location"; when I use "&WorksheetName &Location" in the title of worksheet it is displaying both the worksheet title and value of selected page item "Location" in my example.
    But when I use the same (&WorksheetName &Location) in the title of graph or Axis of the graph, it would show up only the name of the worksheet but not the value of page item "Location", instead it would print "&Location"
    Any idea why it is not able to reference the select page item in Discoverer graph? I am using Oracle BI Discoverer 10.1.2.1.
    Thanks in Advance,
    Regards,
    Nidhi Jethoo

    Hi Michael;
    Thanks a lot. It might not have been considered necessary but you do require, e.g in my case I am plotting Average value of a Parameter and it does make sense in including the name/value of Parameter(surface water temp/bottom watter temp) as an Axis instead of just a constant Parameter or say Average Parameter. So that user can plot the variation of different parameters by changing the page items and when user changes the value of parameter and export the graph he/she has the parameter name(actual value) in the graph.
    But I can include all the parameters (&Parameters) or all the page items(using &PageItems) in graph then why not individual page-item and individual parameter.
    I would log a SR and see what they say.
    Thanks again,
    Nidhi

Maybe you are looking for

  • CRUD Ruby on Rails Oracle database

    A Create-Read-Update-Delete application may be developed with Ruby on Rails and Oracle database. http://www.regdeveloper.co.uk/2006/07/03/ruby_rails_part1/ http://www.regdeveloper.co.uk/2006/07/17/ruby_rails_part2/

  • How to redeem iTunes gift sent from India in UAE?

    I'm using iTunes in India and sent many albums to my friend who lives in Dubai. All albums costed me 3550INR and now he cannot redeem that gifts I'm so sad about that any way to redeem gifts there?

  • Can't update CS2 to 8.0.1

    I've been trying to update GoLive CS2 (8.0.0) to 8.0.1.  On Win XP Pro.  I've tried using Adobe Updater and manually downloading the updater.  Whenever I run the update program I get an error saying "Setup cannot locate Adobe GoLive.  Please reinstal

  • Printing a Highlighted/Selected part of an internet page

    New to the Mac world. I am use to Click and highlighting/Selecting part of a web page, then when printing just pick selected from the print menu. I do not see this on the iMac, is there a way for it to be done?? Thank you for your time.

  • Set default program

    I am new to macs so I don't really know my way around very well. I installed office on my computer but much prefer pages. I know pages can read .doc files but can't figure out how I can set my mac to always open them in pages instead of word. Help pl