Hiding items on page entry if NULL in the database ...

Environment: APEX 3.1.1.00.09
I have two (2) page items that I would like to hide in two (2) instances:
1- when the page is first displayed as the user is entering a new set of data
2- when the values of these items are NULL based on the fetched database row
I would like the items to display if the values in the row fetched are not NULL.
I already have logic that will hide the items based on specific values being selected or changed by the user but as requested in (1) above I would like the items to be hidden initially.
Be gentle as I'm still a newbie. :-)>
-gary

Hi Gary - I thought today was a public holiday in the US (something to do with a new president?)
Anyway..
You're correct - javascript is nothing to do with Apex, so debug doesn't even know it exists. The easiest way to test if your script is being run is to put alert('message') messages within the code:
function ...()
alert("Here 1");
alert("Here 2");
etcName the messages in a way that you can easily spot what is being run.
Perhaps it would be easiest for you if I explained what I did on my page (assuming that it is doing what you are trying to do? If not, just say).
On my page attributes, I have added the following into the HTML Header setting:
<script type="text/javascript">
function shA()
var l = document.getElementById('P6_LISTA');
if (l.value == 'A')
  $x_ItemRow('P6_TEXTA','SHOW');
else
  $x_ItemRow('P6_TEXTA','HIDE');
function shB()
var l = document.getElementById('P6_LISTB');
if (l.value == 'B')
  $x_ItemRow('P6_TEXTB','SHOW');
else
  $x_ItemRow('P6_TEXTB','HIDE');
</script>Strictly speaking, you could add this anywhere above the P6_xxx items - but the HTML Header is the best place to add javascript functions.
I then have four items on the page:
P6_LISTA - a select list
The Source is: STATIC:A,B,C,D,E
and the HTML Form Element Attributes setting is: onchange="javascript:shA();"
P6_LISTB - a select list
The Source is: STATIC:A,B,C,D,E
and the HTML Form Element Attributes setting is: onchange="javascript:shB();"
Both of these have Display Null: Yes - Null display value: -Select- and Null return value: Z
P6_TEXTA and P6_TEXTB are both normal text fields and have no special settings.
Finally, I have a region in the Before Footer display point and using "No Template" that has a Region Source of:
<script type="text/javascript">
shA();
shB();
</script>(this just runs the show/hide code on page load)
Does that help?
Andy

Similar Messages

  • The Remote Desktop Connection Broker server could not enumerate the targets for the provider named NULL from the database.

    When I try to install Connection Broker on a Windows 2012 R2 Server in a Windows 2003 domain I get this error:
    The Remote Desktop Connection Broker server could not enumerate the targets for the provider named NULL from the database.
    Pooled virtual desktop collection name: NULL
    Error: Logon to the database failed.
    I have added both the Connection Broker server and the 2 remote desktop servers (also Windows 2012 R2 Servers) to the "Windows Authorization Access Group" in the domain according to this: http://support.microsoft.com/kb/331951
    But it still does not work :-(
    I keep getting same error....
    Any idea what I might be missing ?

    Hi,
    Thank you for posting in Windows Server Forum.
    Firstly please let us know by which method you have setup RDS role. You can have more advantage and feature when you will install with Standard deployment instead of Quick start deployment. So if you have setup with quick start option then you can try installing
    with standard type and check the result.
    In addition, please check SQL server database is properly configured for RDS server. Also check that domain controller properly communicates. Kindly go through below thread for more information.
    Server 2012 RDS - Remote
    Desktop Connection Broker Client failed to redirect the user domain\username. Error: NULL
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • Enable single item recovery with two retention settings at the database level.

    Hello All,
    We have an Exchange 2010 SP3 RU4 environment and planning on moving from third party archives solution to Native Exchange archives for cost reduction purposes, upgrading to Exchange 2013 to benefit from added in place features is not within scope at
    this stage.
    We are looking at implementing the following steps and want to know if it will work:
    1-Create archive DB(s) as per our usage and growth projections
    2-Enable archives for all our users and migrate current archive content to it.
    3-Create Retention Tag/Policy to move all records from live to archive "Age limit for retention" 90 days (no retention tags on the policy)
    4-Enable Single Item recovery for all of our users (script the same to run twice daily to enable SIR for newly created accounts)
    5-Set the "Keep Deleted Items" on the Live DB(s) to 90 days and the Archive DB(s) to 7 Years
    6-We are NOT using Legal Hold or plan to use it except on per as need basis
    Are we accomplishing the following:
    1-Items are automatically archived after 90 days
    2-Items archived now have a 7year retention based on the "keep deleted items" set for the archive DB(s)
    3-Items copied back to the live mailbox by a user will be returned to the archive database the next time the folder assistant runs against this user account (based on load or if run manually)
    4-Hard deleted items by a user is recoverable as long as the email record is within the retention period set at the database where it resides.
    5-Hard deleted items are recoverable using MFCMapi or by a restore.
    6-Items are permanently purged on the archive DB(s) after 7 years.
    Any input, ideas, recommendations, clarifications would be greatly valued and appreciated.  
    Ash

    Thanks CodexCZ,
    So, SIR will "kind of" do the same as the retention tag except I can use different durations based on the limits on each DB? am I correct?
    thanks again.
    Ash

  • How to create a link to a web page that is connected to the database?

    i am developing a web form in java using Oracle's JDeveloper. i created the form which is connected to the database and now i want to put a link in a page that when clicked it shows the form and populates it if necessary. i have no idea how to do that, can anyone please give me an example or where i can find an example?

    Its really hard to answer this question with this enough information....Which Jdeveloper version? which technology you are using to create this web form ? ADF BC or others
    If 11g then are you aware of Task flows?

  • Item "Start/stop table":  Counts towards 100 item per page limit?

    One of my form pages has many items and aligning them all just right is quite a chore.
    I found myself using lots of those handy "start/stop table" items instead of fighting with the colspan, rowspan, New Line/New Field attributes.
    Question: Do these "start/stop table" items count toward the 100 item per page limit?
    [I hope the answer is No]
    Thanks

    Vikas - The answer is no. It's only when the counter gets incremented, e.g., between p_t01 and p_t02, ... You can see that the stop-and-start (not star/stop) items do not generate html items with such a sequence component.
    Scott

  • Add item "save page as" to the tool bar line

    I want to add the item "save page as' [CTRL+S] to the toolbar line. If I right click the line then click customize that function is not listed in the Customize Toolbar box. Where can I find it again so I can add it as I did with the printer icon?

    Thanks guy you're a big help. I would of never found that site or even have a clue to start looking

  • Display Image from the database but prevent it from refreshing on every pages

    Hi there,
    I can see there are many discussions around this but my query is slightly different. I'm writing this on behalf of one of my developers. (sorry for my ignorance on techie stuff.. :-))
    A logo is being displayed on a few pages, which is called from the database. However, the problem is that  - this logo refreshes every time when you traverse to each page causing a performance issue or sometimes slow loading of the image.
    My question is - how do we stop it from loading on each page from the database?.  I would rather load once when the main page loads initially and then maintain this on other pages too.
    We can keep this logo on a file system (FS)  and display it via CSS/HTML/frame but since we want to keep it flexible/dynamic where a user can upload a new one whenever it changes and hence DB seems to be the suitable option (in my opinion).
    Can someone please help?
    If you need any further info around the coding how it is being done at present, pls let me know.
    Thank you

    read this http://docs.oracle.com/cd/B28359_01/appdev.111/b28393/adlob_tables.htm#g1017777
    you can cache lobs in the database too
    you can also upload the pic in your file system using utl_file package and then put the image in the working directory mentioned in i.war
    you can then reference the image and it will not be stored in the database and will be cached
    Regards,
    Vishal
    Oracle APEX 4.2 Reporting | Packt Publishing
    Vishal's blog

  • Populating menu items from the database...is it possible?

    hi
    using :forms 10g
    we have a requirement in forms where we need to populate the menu items from the database.first we used hiearchial tree where it was possible.but since the requirement changed i am not sure that whether the menu items can be populated by data from the database...will be glad if someone could throw some light on this issue...
    thanks

    You could always do it but would need to put a fix limit on the number of menu items.
    For example you could create a set of menu items at design time with the visible property set to False.
    While reading the database, you then set them to True while setting the label to whatever you require.
    But it all depends also on what you want your menu items to do when selected.

  • Page level validation to prevent duplicate data entry into the database

    Hello,
    Can anyone please help me out with this issue.
    I have a form with two items based on a table. I already have an item level validation to check for null. Now I would like to create a page level validation to check that duplicate data are not entered into the database. I would like to check the database when the user clicks on ‘Create’ button to ensure they are not inserting duplicate record. If data already exist, then show the error message and redirect them to another page. I am using apex 3.2
    Thanks

    Hi,
    Have you tried writing a PLSQL function to check this?
    I haven't tested this specifically, but something like this should work:
    1) Create a Page Level Validation
    2) Choose PLSQL for the method
    3) Choose Function Returning Boolean for the Type
    For the validation code, you could do something like this:
    DECLARE
        v_cnt number;
    BEGIN
        select count(*)
        into v_cnt
        from
        your_table
        where
        col1 = :P1_field1 AND
        col2 = :P2_field2;
        if v_cnt > 0 then return false;
        else return true;
        end if;
    END;If the query returns false, then your error message will be displayed.
    Not sure how you would go about redirecting after this page though. Maybe just allow the user to try again with another value (in case they made a mistake) or just press a 'cancel' button to finish trying to create a new record.
    Amanda.

  • Items on page not set when called via hyperlink from charts

    hello anyone who can help me on this thorny issue,
    i have a barchart on one page (page 39), where if you click on the bar chart, page 40 opens and variables are passed on to items on page 40. the variables depend on which bar was clicked. looks somethiing like this:
    select 'F?P=102:40:'||:APP_SESSION||'::NO::P40_DATE,P40_JAHR:'||to_char(datum, 'yyyy.mm.dd')||','||to_char(datum, 'yyyy') link,
    to_char(datum, 'dd.mm.yyyy') Datum,
    Avg_mips
    from ... some sql query....
    this generally works - BUT, once in awhile, the correct page opens, but the items are NULL!
    only when i press F5 to refresh the page, do the variables correctly pass to the items and the proper query is performed...
    after some testing, it seems to happen when i click quite fast. quickly get back to the page 39, click a new bar and then i'm back at page 40 again.
    if i do this slowly, maybe wait a couple of seconds, it generally works.
    for ex., the URL would look something like this:
    http://daidalos:7777/pls/apex/F?P=102:40:2118535974571692::NO::P40_DATE,P40_JAHR:2008.12.16,2008
    - i know the variables are correct when i look at the URL
    - yet the new graph on page 40 shows null values, and a click on the "session" button confirms that the items are null!
    - once i press F5, the URL is the exact same, onle the items are now "refreshed" and the proper processing can take place.
    so, can anyone tell me what is going on here and how i can avoid this?
    the items are set as "hidden" (not protected). there are no computations or default settings to the items, and they are not reset to null at any time.
    regards,
    mike

    Mike:
    I suspect that the chart on page 40 is being rendered by an APEX database connection that is not the same one that renders the rest of the stuff on page 40. So, it is possible that the database connection rendering the chart does not see the new values for the page items set in the URL as these may not have been committed to the database yet.
    You could try this.
    Change the chart query to be
    select 'javascript:setStuff("' || to_char(datum, 'yyyy.mm.dd') ||  '","' ||to_char(datum, 'yyyy') || '")' link,
    to_char(datum, 'dd.mm.yyyy') Datum,
    Avg_mips
    from ... some sql query...Add the JS below into the HRML page header<script>
    function setStuff(p_date,p_jahr) {
      $x('P40_DATE').value=p_date
    $x('P40_JAHR').value=p_jahr
    doSubmit('XXXX');
    </script>Define an 'After Submit...' branch to page 40. Make the branch conditional on Request = 'XXXX'
    varad

  • How to avoid the hard limit of 100 column and items per page?

    I have created a Form on a Table with Report. I need to create/edit approximately 175 items. The items on the Form have a limit of 100 column and items per page. What is the best way to carry the remaining items to another Form and doing an insert or update? or is the 100 column limit on the insert/update per table as well?
    Thank You.

    Hi Rick,
    The 100 item limit is on a page, not a table, so you shouldn't have any trouble with your insert or update processes.
    Here's a thought:
    Report currently has a column that links to the first page of items (page 14) with the retrieved row. Presumably you also have a Add New button on the report page that links to page 14 for a new row.
    Define a Next button on page 14 that branches to the second page of items (page 16). Also define a Previous button on page 16 to return to page 14. But page 16 would be the only page with a Save button.
    Now, if user clicks Add New, user will get a blank page 14. Once user enters the info and passes validation they click Next and will be sent to page 16 to enter the remaining info and Save.
    If user clicks one of the column links, they will be brought to page 14 with the clicked row - they can change whatever info there and click Next, or just click Next, to get to page 16. After any changes are made, they click Save.
    I'm assuming you've been thru the tutorials and realize that you'd really have two Save buttons defined for page 16 - one conditional on your primary key item having a value (existing record) and one conditional on it being null (new record) - check out the tutorials for more info, but this is how the application would know whether to run an insert process or an update process.
    Hope this all makes sense and can help,
    John

  • Page values becoming null

    Hi,
    I've created a quotation form, In that, I've created a application process to get details of a customer from the customer master. If I'll enter Customer ID, details are coming automatically. The problem is, If the customer is not existing in the master, I'm entering customer details directly into the form without id and I'm saving these details in the quotation table. I can see the details also in the table. But when I'm editing the exiting quotation, I can see all details in the form, But When I press any button all other details are existing. But related to customer details are just becoming null. This is happening only in the form. Details are existing in the quotation table.
    What could be the problem.
    Thanks and Regards,
    Sudha.

    Hi Sudha,
    Without seeing the page this is my best guess as to what is happening.
    If you have created the form using the automated row fetch wizard it will by default have created a reset page process. When you resubmit the page this will be clearing the form items. If this is the case you will need to change the behavior of this process.
    cheers,
    Ron

  • Placing library item into page

    This script for placing library item into page and applying object style to the item. In line 16, script shows that "assets" property does not support. Please resolve this.
    if (app.documents.length==0){
        alert("Please open the Document");
        exit();
    if (app.libraries.length==0){
        alert("Please open the Library");
        exit();
    app.findTextPreferences=app.changeTextPreferences=null;
    app.findTextPreferences.appliedParagraphStyle="MN";
    var myfound=app.activeDocument.findText();
    alert(myfound.length);
    for(i=0; i<myfound.length; i++){
    var mylib=app.libraries.assets.itemByName("Box").placeAsset(myfound[i].insertionPoints[0]);
    var mymove=myfound[i].move(LocationOptions.atBeginning, mylib.insertionPoints[0])
    mylib.appliedObjectStyle="MN_Obj";

    To make that work, you have to address an open library (line 16).
    app.libraries describes the collection of all open libraries, not a distinct one.
    If only one library is open you could address the one with its index:
    app.libraries[0]
    If you already know the name of the library or better, the exact path of the library, you can:
    1. Make sure to open it
    2. Call it by its name
    Let's assume you know the name and you know that the asset you want to place is stored inside, you could do it this way:
    app.libraries.itemByName("TheNameOfTheLibrary").assets.itemByName("Box").placeAsset(
    /*Wherever you want*/
    Now, what will this line return?
    A library object? Hardly. So be cautious with using a variable name like "mylib".
    According to documentation it is returning an Array, and we can assume, that in this array is the object that is placed out of the library. Your asset stored in the library which goes by the name of "Box". Whatever that is.
    If you want to find out, you can use the following, more descriptive variable: "myPlacedAsset". That sounds more neutral.
    var myPlacedAsset = app.libraries.itemByName("TheNameOfTheLibrary").assets.itemByName("Box").placeAsset(
    /*Wherever you want*/
    Using the ESTK (ExtendScript Toolkit) together with $.writeln() can write the true nature of the placed asset to your JavaScript Console:
    $.writeln(myPlacedAsset.constructor.name);
    is informing you what kind of object "myPlacedAsset" really is. If indeed it is an Array, you could look for its length. If its length is "1", you get to the "heart" of your placed object by:
    $.writeln(myPlacedAsset[0].constructor.name);
    Or by that more inquisitory question:
    $.writeln(myPlacedAsset[0].getElements()[0].constructor.name);
    If your array is of a greater length, you have to loop through this array and question every single object!
    Before testing, exchange my comment "/*Wherever you want*/" with the code you like to use: Obviously the first insertion point of your found text. Hold on! This will backfire to you, because every time you place one instance of the asset you will add a character to your found text and shift the original insertionPoint. Better loop from back to forth or do the search from back to forth.
    Adobe InDesign CS6 (8.0) Object Model JS: Text
    Please, try that and report back…
    (Isn't noone reading the documentation these days?)
    Indesign JavaScript Help
    Adobe InDesign CS6 (8.0) Object Model JS: Table of Contents, Libraries Suite
    Adobe InDesign CS6 (8.0) Object Model JS: Library
    Adobe InDesign CS6 (8.0) Object Model JS: Asset
    Adobe InDesign CS6 (8.0) Object Model JS: Asset
    Uwe

  • JDBC MS Access--- cannot extract entry with null value with data type Meta

    I'm trying to extract a data entry with null value by using JDBC. The database is MS Access.
    The question is how to extract null entry with data type memo? The following code works when the label has data type Text, but it throws sqlException when the data type is memo.
    Any advice will be appreciated! thanks!
    Following are the table description and JDBC code:
    test table has the following attributes:
    Field name Data Type
    name Text
    label Memo
    table contents:
    name label
    me null
    you gates
    Code:
    String query = "SELECT name, label FROM test where name like 'me' ";
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next())
    String name = rs.getString("name");
    rs.getString("val");
    String label = rs.getString("label");
    System.out.println("\t"+name+"\t"+label);
    catch (SQLException ex)
    System.out.println(ex.getSQLState());
    System.out.println(ex.getErrorCode());
    System.out.println("in sqlexception");
    output:
    C:\Temp\SEFormExtractor>java DBTest
    yet SELECT name, label FROM test
    null
    0
    in sqlexception

    The question is how to extract null entry with data type memo?Okay, what you need to do is this:
    if (rs.getString("val") == null)
      // do something
    }This way, when it's a null value, you can check it first, and then handle it how you want, rather than getting an exception.

  • Display  Purchase order, PO Item , Order Number ,entry sheet quantity ,entry sheet price ,invoice quantity, invoice price  against each line number

    hello all,
    i have an ALV report requirement like this,
    on the initial screen i have displayed(for a given agreement number like in ME33K )
    in the selection screen i have taken agreement number as EKPO-EBELN.
    purchase document number        item number        short text        target quantity      net price
    5400000019                                  1                      xxx                  1.000                  304300.00
                                                        2                     xxxx                 1.000                  500000.00
    the above fields i have taken from EKPO table.....
    and on double clicking the  item number i have displayed
    line number          service number       short text           quantity    units    gross price   quantity released
    1                           swr10                   xxxx                 2.00          kg          500             2
    2                           swr11                    xxxx                5.00          EA         500             2
    the above fields i have taken from ESLL (esll-extrow, esll-srvpos, esll-ktext1 , esll-menge  etc......)
    this i have done by passing EBELN to ESLH and getting PACKNO and passed this PACKNO to ESLL.
    now my question is i need to display  Purchase order, PO Item , Order Number ,entry sheet quantity ,entry sheet price ,invoice quantity, invoice price
    against each line number above.....
    from which table do i need to take these fields.....
    please guide me....
    thankq....

    Thanks Andra,
    The problem is the multiple invoices is for non goods receipt item so there will be no delivery.At the time of creating a PO the GR is not checked so there will be no delivery .
    Also this setting is for invoices which are comming from Vendors.But if we are genrating the invoices manually it is not blocking those invoices.Also i there is nowhere mentioned in Incomming invoice to set tolerence for incomming invoice.Are you talking about Vendor tolerences?
    Thanks in advance
    Edited by: Metroid01 on May 14, 2009 6:52 PM

Maybe you are looking for

  • IOS 7 Calendar stuck on September. View won't refresh.

    Calendar on iOS 7 is stuck on september. On monthly view, it won't refresh the view past September. I can scroll down, but it will get stuck on Ocotber, with an empty view. If I click year view, it freezes. I've tried restarting the app, the phone an

  • External Monitor in causing Random Sleep and it doesnt wake up!

    Hi all, After recently buying a new 22" Asus monitor and hooking it up to my macbook core 2 duo (Late 2006 model) running Leopard it has been playing up. I have the computer in clamshell mode, so the top is down and i am using an apple bluetooth keyb

  • How can i increase the number of available segments(30) under Personal Anlysis Flexfield, EBIZ 11.5.10.2

    Hi friends, how can i increase the number of available segments from 30 to more in Personal Analysis Flexfield in HRMS. Because i have to add few more columns to existing key flexfield. but we have only 30 segments under each flex field.how can i ach

  • How do Add JSP to Application already having JSP

    Hi - I have a JSP application based on 10 tables running fine. So I have 10 entities and 10 view objects in JDeveloper 3.2 . Now I have added 2 more tables in the database. I want to add these to my JSP application and generate JSP pages like I did i

  • How to get last URL (history)

    Hi, I need to get the last URL of the user (like stored in the breadcrumb navigation bar) with a Java-call. Is there an API available? Does anybody has a code snippet? The code will be running on an EP 6.20. Could anybody help me please? I am getting