How do I null out an item based on a database column before display?

I am using Apex 3.2
I have an item that is based on database column. My customer wants me to "blank out" the item before it is displayed so the user will have to enter a new value in place of the one that is in the database.
I have tried using a "before region" calculation to set the item to NULL. I can see the value getting set in the debug after the row fetch has occurred, but when the item is displayed, it contains the value from the database, not my calculated valuie.
I also tried using an unsourced text field and then doing an after submit calculation to set the value of the database column item from there, but no luck that way either.
Also tried clearing the item cache, but I think that happens way too early.
There must be a simple way to do this..
Any suggestion?

No problem user486652 (name?),
Yes, the $s function is one of ApEx's built-in's - see the ApEx documentation under API Reference, Javascript API's, and you'll find a wealth of built-in functions that do all sorts of things. For Javascript in general, take a look at www.w3schools.com for some really good tutorial and reference material - I use it constantly.
Ok, so you want to set the browser field to empty after the page loads. Since this is a page event, it isn't something that will fire for a form field element so you don't want the code there. In ApEx 3.2, edit the attributes for the page, and you'll see a setting called "HTML Body Attribute". You'll see a helpful bullet note below the setting saying this is the place to add onload events. The proper syntax will be:
onload="$s('P2_REMEDY_TICKET', '');"Once ApEx puts everything together and the page renders, this code will tell the browser to run that $s function after the page loads.
But be aware - if you take a look at the help for that setting, you'll see that it mentions that this will only work if your page template includes the #ONLOAD# substitution string. Not sure if all ApEx-supplied page templates already have #ONLOAD#, but every one I've used does. If your code still doesn't work, check your page tempate. In the Definition region, under Header, you should see a body tag with something like:
<body #ONLOAD#>...
...If that's there, your page template supports the HTML Body Attribute. If your body tag doesn't have an #ONLOAD#, add it.
Hope this helps,
John
If you find this information useful, please mark the post "helpful" or "correct" so that others may benefit as well.*

Similar Messages

  • When i sync my iPhone 6 with iTunes i get a message that one item could not sync.  how do i find out what item would not sync?

    When I sync my iPhone 6 with iTunes I get a message on my phone that "One item could not sync. See iTunes for more information."  How do I find out what item would not sync?

    Hello lenmin,
    Thanks for using Apple Support Communities.
    To help resolve this issue where you're repeatedly prompted to authorize with your Apple ID in iTunes when syncing, please follow the directions in the article below.
    iTunes: Missing folder or incorrect permissions may prevent authorization - Apple Support
    Have a great weekend,
    Alex H.

  • How can i find out what item has the focus on a form?

    I am disabling a field on a form, which works fine most of the time but occassionaly will throw an error saying that it cannot commit the action as the item is in focus.
    Is there a way I can detect which item on the form has focus before I try and disable my field?

    Hi Darren,
       I am not too sure whether you can find out which input element is in focus, but for your case I can suggest a workaround.
       What you can do is, set the focus away from this field you are disabling, and then try disabling this field. For setting other fields in focus, you can use the requestFocus() mehtod.
    Regards,
    Satyajit.

  • Pre populate an item with source type="Database Column"

    Hello gurus,
    How can I pre populate an item with source used "Always, replacing any..." and source type="Database Column"?
    I have a form that creates/updates rows in a table and when creating a new row I want to populate some of the fields based on some parameters from the previous page. How can I achieve this?
    I tried adding a conditional process when PK is null and populate the expected fields, but in the browser they are not shown with those values, even if I look into the session I can see that they have the values assigned in the process ?!?!?!
    Thanks in advance,
    Florin

    Florin,
    Use the Default Value item attribute. In you case, set the Default Value Type to Static Text with Session State Substitutions and enter your item using the &P1_ITEM_NAME. syntax in the Default value text box.
    Thanks,
    - Scott -

  • MIRO Split out line item based on different tax amounts

    Hello Friends,
    We have a scenario where we get different tax rates related to the same line item quoted on the invoice which we receive from the vendor. The split out of the line item amount into different tax rates is not known at the time of booking the PO. For example, the PO line item is enter with value 1000Eur. This now shows as one line item in MIRO.
    However, when the paper invoice is received fom the vendor, the 1000Eur may be split between delivery cost of 800Eur with tax rate of 10% and legal fees of 200Eur with tax rate of 5%. These tax rates are not always 10% and 5%, they can vary depending on whatever the itme on the PO is.
    Is there any way in MIRO to split out the single line item into separate line items to allow us book a part of the line item with tax rate of 10% and the other part with tax rate of 5%?
    Or suggestions of how to handle this scenario in SAP (apart from going backwards and altering the PO to split into 2 separate line items which is later in the process and involves alot of overhead etc)?
    We tried to activate the Amount Split functionality but (1) this does not seem to allow a split out by tax code and (2) it seems limited only to the Finanl Invoice amount.
    Thanks for any help.
    Regards
    Mik

    No feedback so closing

  • ICal icon on my Mac Book Air displays a circled number at the upper right corner as does Mail for new emails - how do I find out what item(s) that number is referring to? And why does it show up on the Mac Book Air and not my 4S iPhone?

    A circled number appears in the upper right corner of the iCal icon on my Mac Book Air. What does it mean? How do I resolve it? Why doesn't it appear on my 4S iPhone via the iCloud?

    Glenn,
    That number means that you have an event invitation. Use iCal>View>Show Notifications to choose what to do with the notification. Since OS X 10.7.2 is required for iCloud integration, I am not surprised that there are anomalies between the iPhone and the MacBook Pro.

  • How to pass NULL out of a service on an int member

    I accidentally posted this over in the VB section.  It would be helpful if a moderator could move it over here.
    Thanks.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/d339e6ac-9afc-4d71-84ac-47317e9e8de3/assigning-null-to-int-in-a-sqldatareader?forum=vbgeneral

    Hello PaulNations,
    This forum is for WCF Data Service, and since the issue is regarding WCF, there is a specific forum:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf
    I suggest you posting a new question in that forum. And for moving case, we can just move case from this forum others rather than from other forum to this. So you should post a require in the C# where your case is in and the C# moderators
    will help you move the thread to other forum.
    For differences between WCF Data Service WCF:
    http://msdn.microsoft.com/en-us/library/bb907578.aspx
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get image out from LONG RAW from the database

    Dear fellow Oracle users
    I have a table about 50,000 rows one of the the column is LONG RAW.. and we store image files within this column ... almost 99% is gif format.
    Does anyone able to recommand a way to get ALL these images out of the database and save it into a directory. May be a batch process or may be some kind of tools?
    Not all the rows consists of images (i.e some of the the long raw can be null for some row) .
    Any sample codes are very much appreciated...(I am okay with PL/SQL , a little rusty with Java coding but okay to pick it up again...)
    regards
    Ivan

    Hi,
    if u are using oracle forms than u can integrate Webutil with it, there are many function available within webutil to do this.
    Thanks

  • How do I find out the size of a project in iMovie before sending to idvd?

    I need help finding the size of a project before I send it to iDVD?
    Thanks

    In this case size doesn't matter. iDVD only cares about length:
    iDVD encoding settings:
    http://support.apple.com/kb/HT1502?viewlocale=en_US
    Short version:
    Best Performance is for videos of up to 60 minutes
    Best Quality is for videos of up to 120 minutes
    Professional Quality is also for up to 120 minutes but even higher quality (and takes much longer)
    That was for single-layer DVDs. Double these numbers for dual-layer DVDs.
    Professional Quality: The Professional Quality option uses advanced two-pass technology to encode your video (The first pass determines which parts of the movie can be given greater compresson without quality loss and which parts can’t.  The second pass then encodes those different parts accordingly) , resulting in the best quality of video possible on your burned DVD. You can select this option regardless of your project’s duration (up to 2 hours of video for a single-layer disc and 4 hours for a double-layer disc). Because Professional Quality encoding is time-consuming (requiring about twice as much time to encode a project as the High Quality option, for example) choose it only if you are not concerned about the time taken.
    In both cases the maximum length includes titles, transitions and effects etc. Allow about 15 minutes for these.
    You can use the amount of video in your project as a rough determination of which method to choose. If your project has an hour or less of video (for a single-layer disc), choose Best Performance. If it has between 1 and 2 hours of video (for a single-layer disc), choose High Quality. If you want the best possible encoding quality for projects that are up to 2 hours (for a single-layer disc), choose Professional Quality. This option takes about twice as long as the High Quality option, so select it only if time is not an issue for you.
    Use the Capacity meter in the Project Info window (choose Project > Project Info) to determine how many minutes of video your project contains.
    NOTE: With the Best Performance setting, you can turn background encoding off by choosing Advanced > “Encode in Background.” The checkmark is removed to show it’s no longer selected. Turning off background encoding can help performance if your system seems sluggish.
    And whilst checking these settings in iDVD Preferences, make sure that the settings for NTSC/PAL and DV/DV Widescreen are also what you want.
    http://support.apple.com/kb/HT1502?viewlocale=en_US

  • How do I find out or know if everything is backed up before I upgrade to ios 6?

    before I update to ios6 how can I make triple sure that all my music, photos, contacts, notes, and messages are all backed up? in settings I have my iPhone 4 programmed to back up to the iCloud - but how do I know for sure that everything is there? I am hearing horror stories of people losing everything - doesn't everyone back up to the cloud? please help :)

    Check the date and time of your latest backup in Settings > iCloud > Storage & Backup > Manage Storage. Make also a local backup via iTunes, and safe your music, photos and videos etc. manually on your Mac because they are not backed up via iCloud (only photos of your camera roll are backed up).

  • BUG?: Paginate Doesn't Work with Page Item with Source as Database Column

    CREATE TABLE T_PARENT
      ID NUMBER NOT NULL
    , STAFFID VARCHAR2(20)
    , CONSTRAINT PARENT_PK PRIMARY KEY
        ID
      ENABLE
    insert into T_parent values (1, '77258317');
    commit;
    create table T_child as
    select
      rownum id
    , '77258317' staffid
    , dbms_random.string('U', 5) aa
    , dbms_random.string('U', 15) ab
    , dbms_random.string('U', 3) ac
    from dual
    connect by level <= 100;
    /Form page for T_PARENT.
    Classic report:
    select id, aa, ab, ac
    from t_child
    where staffid = :Px_STAFFIDTry and paginate = no data found.
    However, if you first submit the page, then paginate, it works as expected.
    Reproduced:
    http://apex.oracle.com/pls/apex/f?p=54920:57:106342795192226::::P57_ID:1
    If I for e.g. use an item with static assignment, it works fine.
    Cheers,
    Trent
    Edited by: trent on Apr 19, 2013 11:59 AM
    Also, it works fine when you reference the PK column.

    Just like with the paginate, the problem may also happens when you change the sort column or direction by clicking on the header.
    If the item in the WHERE clause was being set fromt he URL this wouldn't be an issue because it would be saved on the Persisten Session state.
    Regarding session state, there are two kinds Temporary or in memory and Persistent. When the page is rendering the item values are only on the Temporary session state. This is why the report renders correctly on page load.
    The item value won't go to Persistent session state until the page is submitted. Item values also go to Persistent session when they are passed in the URL, or explicitly set with a computation, etc..
    The Session state Dialog can only show the Persisten session state which is saved in DB tables. It's unable to show you the values during page render. For that you need other mechanisms like debug messages.
    I think that when you set page item as SQL query and Only when current value session state is null the value must be saved to Persistent session state. If you can examine the value with the Session Dialog then that would confirm that.
    Hope this helps.
    Thanks
    -Jorge

  • How do  we check the check box items based on the databse fields.

    Hi All,
    I have a requirement like as mentioned below#
    1. I have a combox box whcih i will be populated from database.
    2. I have created two check box as "Stategric " and "Non Stategric".
    3. Now when i select the combox box condition i need to select the check box items.
    4. But the problem is i wil be knowing weather it is a stategric or Non stategirc based on the database column.
    5. How do i need to map the database point of view and correlacte with javascript pont of view.
    6. Do we need to write any Application process to achieve this task and who we can do that.
    Thanks,
    Anoo..

    Hi VC,
    As per my understanding the code should be placed between --.
    Based on this i have placed the code
    function setCheckbox(pThis, pItem){
    alert('inside');
        var l_code = '';
        // Get checkbox name
        rName = document.getElementsById('P1_ENG_BAU').firstChild.name;
    alert("The value is"+rName);
        // Fire AJAX
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
        get.add('F120_COMPANY',pThis.value);
        gReturn = get.get('XML');
        if (gReturn) {
          var values = gReturn.getElementsByTagName('value');
          var messages = gReturn.getElementsByTagName('message');
          // Build the checkbox
          for (i=0; i<values.length; i++) {
            var rValue = values.firstChild.nodeValue;
    var rMessage = messages[i].firstChild.nodeValue;
    l_code+='<input id='+P1_ENG_BAU+'_'+i+' type=checkbox value='+rValue+' name='+rName+'>';
    l_code+='<label for='+P1_ENG_BAU+'_'+i+'>'+rMessage+'</label>
    document.getElementsById('P1_ENG_BAU').innerHTML = l_code;
    Correct me if iam understanding is wrong.
    Thanks,
    Anoo..
    Edited by: Anoo on May 31, 2012 11:04 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Clearing out login items?

    How do you clear out login items ?

    System Preferences - Users & Groups - Click the User - click Login Items and select the items to remove and remove them by clicking the - symbol at the bottom of the box.

  • How do I find out my monitor's resolution?

    I want to make a wallpaper for my mac connected to a Dell monitor. How can I figure out what size to make it?
    Thanks

    Open the Displays pane of System Preferences. If you can't get it from there, take a screenshot, select the png in the Finder, choose Get Info from the File menu, and look at the More Info section.
    (106928)

  • How to render web items based on the authorisation profile of the user

    Hello,
    Is there any way to render web items based on the authorisation profile of the user. The only way i can think of is:
    - Write ABAP to look up into the security mapping tables.
    - Convert the ABAP report into RFC-Enabled FM. The selection variables will be part of the import/export parameters of FM and table can be used to display the result.
    - Create HTML template using WAD, write Java Script to call the FM and map the import/export parameter. Display the result in Table.
    But i don't know How to use the Java Script to call Function Module (FM) and get back the authorization through parameter.
    Is anyone know about it or is there any other method to do it? I can't find any solution and it is very critical for me.
    Any help is highly appreciated.
    Rajat

    Hi Rajat,
    Do you mean that you want certain users to be able to use only certain web items? I think you can use the libraries for that and assign them to roles:
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/0f813b420ce60ee10000000a114084/content.htm
    Hope this helps...

Maybe you are looking for