Adding database columns  in Coldfusion

Hi everyone...
I have a huge problem at work and I have no idea how to fix
it.
-I need to generate a drop-down list.
-This list needs to have one value shown for around 5,000
records from the below data:
-I need to query a database for 3 columns, course_name,
course_num, and section_num
-After querying the DB, I need to add the three colums up to
something like "EXM-1-1"
-Then I need to make a dropdown list (again, about 5000 items
long) with each of these results.
-The types for the 3 columns (respectively) are varchar(7),
varchar(20), and mediumint(7)

freedomflyer wrote:
> That works...well...great! Thanks so much!
> Just a couple of questions....
>
> 1) I thought I had to externally concatenate the strings
by using "&"
You could use the concatenate operator [&] if you would
like to
concatenate strings together into one larger string. I.E.
<cfset
theLargeStr = aSmallStr & "-" & bSmallStr>.
What I did in the previous code was just output three
separate string
variables with two string literals of the '-' character
between them.
Interestingly ColdFusion is very forgiving on how one
concatenates
strings so that often the two following lines are equivalent.
Note the
placement of the pound signs and quotes.
<cfset theLargeStr = aSmallStr & "-" &
bSmalStr>
<cfset theLargeStr = "#aSmallStr#-#bSmalStr#">
I think most people would find the first line a bit cleaner
and clearer
but otherwise they are the same.
> ...It almost seems like
>
#myLongList.aVarchar#-#myLongList.bVarchar#-#myLongList.int#
> would attempt to subtract values. (And yet it works...)
So why does this
> happen? Is it not possible to put a value of, say, 5-3
in the option tags and
> have it display "2" as the option?
<cfoutput>#aVar#-#bVar#<cfoutput>
This output two variables separated by a '-' character.
<cfoutput>#aVar-bVar#</cfoutput>
This would output the difference (subtraction) of aVar and
bVar.
Note the placement of the pound signs this makes all the
difference.
>
> 2) I noticed the <cfoutput/> tags sandwiching my
option tags. Does this mean
> that HTML and CF are both very easily intermeshed?
*_TOO_ easily* according to some detractors of ColdFusion.
Yes CFML is designed to be intermingled into the HTML that it
is
dynamically building.
This can be easily abused and create horribly hard to
understand and
maintain code. So it is always a good practice to not
intermingle
unnecessary business logic processing with the display logic.
But for a
purpose like this, which was to display a dynamic list of
option tags,
this is the way most would write it.

Similar Messages

  • Adding new column to production database

    I have to add a new timestamp column, that defaults to the current date/time, to an existing production database. The table is large - 150M records. I am trying to understand the ramifications of adding a new column to a table this large that gets hit often, mostly with inserts and reads. The column does allow null values and I am not going back and populating existing records with a value. Basically, I am looking for some best practice guidelines - how to prepare, what to expect, what other processes should be followed along with this schema update.

    Radiators wrote:
    Thanks, I have not found any %TYPE or %ROWTYPE dependencies on the table I am altering. But at the same time I do not understand how these types of dependencies would invalidate packages. I wouldn't be breaking any %TYPE dependency because I am not dropping columns, only adding a new one. And according to documentation for %ROWTYPE - "If columns are later added to or dropped from the table, your code can keep working without changes." Can you point me to Oracle documentation that describes your concern in detail? Thanks.you can test it yourself
    SQL> CREATE TABLE abc (c1 NUMBER);
    Table created.
    SQL> INSERT INTO abc
      2       VALUES (99);
    1 row created.
    SQL> CREATE OR REPLACE PROCEDURE test_proc
      2  AS
      3     v   abc%ROWTYPE;
      4  BEGIN
      5     SELECT c1
      6       INTO v
      7       FROM abc
      8       WHERE ROWNUM = 1;
      9  END;
    10  /
    Procedure created.
    SQL> SELECT object_name, status
      2    FROM user_objects
      3   WHERE object_name = 'TEST_PROC';
    OBJECT_NAME                STATUS
    TEST_PROC                    VALID
    SQL> ALTER TABLE abc ADD (c2 VARCHAR2(10));
    Table altered.
    SQL> SELECT object_name, status
      2    FROM user_objects
      3   WHERE object_name = 'TEST_PROC';
    OBJECT_NAME                 STATUS
    TEST_PROC                     INVALID
    SQL> you should also consider the chance that some where if people are using "select * into" using this table, which will fail since you added new column. i don't see any unusual performance bottlenecks by adding a new column. in case of the backups, yes the earlier backups will not have the column. if you restore it, you will see earlier table structure itself. i have one specific question. why are you not attempting this in development/test environment first? even if it is a simple insert, it's always important to do it in test environments before attempting on production db. one thing for sure i know is, after adding column, you will have to recompile all the invalid dependencies. i think, it's better if you attempt it in test db and come up with any issues you see rather than asking a general question where problematic scenarios are plenty and rarely unknown before hand.

  • Commit isn't updating a database column

    I've got an ADF/UIX application that has a Commit button. If added a column to the database, and have propagated the schema change through my model and view controller. The new text field displays the data in the database, but the Commit button doesn't update the database with any user changes. Changes in the original data fields are committed, but not the new field that I've added.
    What do I need to modify in my ADF/UIX application so that the Commit button adds the new data field in it's update action?

    Does it work in the application module tester?

  • Database column comments in Discoverer report

    Hello,
    I am trying to display database column comments in Discoverer reports. Is there any easy way to display these comments, other than copy and paste?
    I am referring about comments from user_col_comments view...
    SELECT column_name, comments
    FROM user_col_comments
    Thanks in advance...

    Hi
    If you create table or view comments in the database and point a Discoverer folder directly at the database object Discoverer will read the comments in and store them in the description property. If you have added the comments after the EUL was built, refreshing the folder(s) should be all you need to do.
    Best wishes
    Michael

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

  • Adding Additional Columns in LOV,That column capturing values from function

    My requirement:
    Adding Additional Columns in LOV,That column values capturing values returned by function.....
    Give me the ides to achieve this...

    Hi Subramaniam,
    If your requirement is to call a Database function then please make use of the below code ,
    import java.sql.CallableStatement;
    import java.sql.SQLException;
    import oracle.apps.fnd.framework.server.OADBTransactionImpl;
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    OADBTransactionImpl txn = (OADBTransactionImpl)oaapplicationmodule.getOADBTransaction();
    CallableStatement cs = txn.createCallableStatement ("begin :1 := xxpackageName.xxfunctionname(:2,:3); end;",-1);//Replace your function Name
    try
    cs.registerOutParameter(1, Types.VARCHAR);
    cs.setString(2,InputParam1); // InputParam1 is the name of variable captured from the OAF page and passed into function as input parameter
    cs.setString(3,InputParam2); //InputParam2 is the name of variable captured from the OAF page and passed into function as input parameter
    String outParamValue = null; // outParamValue will capture the value returned by function .
    cs.execute();
    outParamValue = cs.getString(1);
    catch(SQLException sqle)
    throw new RuntimeException(sqle);
    finally
    cs.close();
    Let me know if its not clear .
    Keerthi
    Edited by: keerthioaf on Nov 23, 2012 5:17 AM

  • Adding the columns dynamically in crystal report

    Hi,
      I am developing a application using asp.net and crystal report. In a report the column is created dynamically( ie, the report gets input from a sp which returns N no. of columns). Since i dont know the column name and no. of columns at design time i am not able to create the report. If any of you have any idea on adding the columns dynamically please send me the code or the link.
    Thanks
    Sankar

    Hello Sankar,
    please see CS code for VS 2005 below to add a database field to a report using inproc RAS.
    This sampels retrieves the table column name from the database and adds it to the report.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    namespace CS_Add_Field_inproc
        public partial class Form1 : Form
            // CR Declarations
            ReportDocument boReportDocument;
            ISCDReportClientDocument boReportClientDocument;
            CrystalDecisions.ReportAppServer.ReportDefModel.Section boSection;
            CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject boFieldObject;
            public Form1()
                InitializeComponent();
                //Create a new ReportDocument
                boReportDocument = new ReportDocument();
                // load the RPT file
                boReportDocument.Load("..
    AddField.rpt");
                //Access the ReportClientDocument in the ReportDocument (EROM bridge)
                boReportClientDocument = boReportDocument.ReportClientDocument;
                //Get the first section in the details section
                   boSection = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea.Sections[0];
                   //Create the field object that we will add to the report and set all of its properties
                   boFieldObject = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject();
                //Set which field to use for the data to be displayed
                   boFieldObject.DataSourceName = "{Customer.City}";
                   boFieldObject.FieldValueType = CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeStringField;
                   boFieldObject.Left = 4 * 1440; //1440 twips per inch
                   boFieldObject.Width = 3 * 1440;
                   boFieldObject.FontColor = new CrystalDecisions.ReportAppServer.ReportDefModel.FontColor();
                   boFieldObject.FontColor.Font.Name = "Arial";
                   boFieldObject.FontColor.Font.Size = 10;
                   boFieldObject.Format.HorizontalAlignment = CrystalDecisions.ReportAppServer.ReportDefModel.CrAlignmentEnum.crAlignmentLeft;
                   //Add the object to the report
                   boReportClientDocument.ReportDefController.ReportObjectController.Add(boFieldObject, boSection, -1);
                // show in reportviewer
                crystalReportViewer1.ReportSource = boReportDocument;
            private void button1_Click(object sender, EventArgs e)
                //Get the first section in the details section
                boSection = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea.Sections[0];
                //Create the field object that we will add to the report and set all of its properties
                boFieldObject = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject();
                //Set which field to use for the data to be displayed
                boFieldObject.DataSourceName = "{Customer.City}";
                boFieldObject.FieldValueType = CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeStringField;
                boFieldObject.Left = 4 * 1440; //1440 twips per inch
                boFieldObject.Width = 3 * 1440;
                boFieldObject.FontColor = new CrystalDecisions.ReportAppServer.ReportDefModel.FontColor();
                boFieldObject.FontColor.Font.Name = "Arial";
                boFieldObject.FontColor.Font.Size = 10;
                boFieldObject.Format.HorizontalAlignment = CrystalDecisions.ReportAppServer.ReportDefModel.CrAlignmentEnum.crAlignmentLeft;
                //Add the object to the report
                boReportClientDocument.ReportDefController.ReportObjectController.Add(boFieldObject, boSection, -1);
                // show in reportviewer
                crystalReportViewer1.ReportSource = boReportDocument;

  • Errors processing after adding Computed Column to Time.

    Errors in the high-level relational engine. The 'Time' table is based on a named query, and contains one or more computed columns. A table based on a named query cannot contain computed columns. If the computed columns are necessary, add them to the query
    expression.
    Help me, pls! Thanks!

    Hi CUONGNV0207,
    According to your description, you get this error when processing cube. Right?
    As the error message mentioned, a table based on a named query cannot contain computed columns. If you create a computed column in this table, it will throw this error. In this scenario, please go to the DSV and check if that table is set up with named query.
    You can replace it with a DimTable in your database.
    Reference:
    cryptic error when processing cube
    Errors processing after adding Computed
    Column to Time
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Non Database Column to Grid Control

    Hi,
    How do I add a Non database column to a Grid Control which is
    based on a Rowset. I want the similar functionality of a
    multirow Block in D2K Forms, which is based on a Database query
    and to which another item is added which is non Database item
    and it is also displayed as any another item in the same
    multirow block. The updatable and queryable property for this
    item is set to false.
    How do I get similar functionality in JDeveloper using InfoSwing
    GridControl. Thanx in advance.
    --- Ravi
    null

    The GridControl does not have built-in support for this
    functionality. However, the GridControl source code is provided
    so you can extend the control to provide this functionality.
    In 3.0, the Oracle Business Components for Java will provide the
    ability to create objects that can mix db and non-db attributes.
    The GridControl can then be bound to this object to provide the
    functionality you seek.
    - PSW
    Ravindra Channe (guest) wrote:
    : Hi,
    : How do I add a Non database column to a Grid Control which is
    : based on a Rowset. I want the similar functionality of a
    : multirow Block in D2K Forms, which is based on a Database query
    : and to which another item is added which is non Database item
    : and it is also displayed as any another item in the same
    : multirow block. The updatable and queryable property for this
    : item is set to false.
    : How do I get similar functionality in JDeveloper using
    InfoSwing
    : GridControl. Thanx in advance.
    : --- Ravi
    null

  • Form -  Available Database Columns

    I deleted a column from the list of database columns in a form.How do I get one back or if I have added more columns in the database, how do I refresh this list to show all avaiable columns.
    Thanks

    Hi,
    You should add a new column for the deleted columns with the same name as of the database table field(click on FORM + at top of all fields in the form),and also if new field is added you should give the same name as of the field on the form.It will not be refreshed once if the fields are added after once you have selected the table in "table/views" section.
    Hope it helps.
    rahul

  • Adding a column to a DB table with CMP entities

    Morning all.
    I've been asked whether adding a column to a database table will break the CMP entity bean (EJB2) associated with the table. I suspect that it won't and that the new field will be ignored. Another developer here says that it will no longer compile (I can't see how this could be the case but still...) and I can find no evidence to either refute or corroborate either position.
    Can anyone tell me for definite - if we add a column to a database table mapped to a CMP entity bean, will we HAVE to update the bean, or can we leave it ignorant of the new column?
    (For the purposes of the question, please assume that the column has no constraints i.e. can be null etc.)
    Thanks in advance
    -- kaideejee
    Message was edited by kaideejee : CMB entities? What are they? Typo fix.

    Well alterations(adding / removing a column) to the
    table should be made available to the bean
    irrespective of the persistance(CMP OR BMP) or normal
    bean with your own methods that depicts the
    behaviour.
    reason is simple: probably bean may/may not contain
    the corresponding setter or getter or finder methods
    related to the ALTERED TABLE(NEW COLUMN)The reason for what is simple? Sorry I may have missed your point there. Are you saying that it's correct practice to make it available to the bean, or that it will be made available behind the scenes, subject to getters/setters being created?
    Assuming we choose not to create these getters and setters (we have a horrible hybrid monster which uses stored procedures for some things and EJB for others, so it's feasible that the EJB end may not need to see some fields used by other parts) would the entity beans continue to play nicely with the database rows, or would the additional columns throw it completely?
    Cheers
    -- kaideejee

  • (Error due to database column of type Number)oracle.jbo.PiggybackException: JBO-28300

    Hi,
    I have deployed a BC4J component as an EJB on OC4J using JDeveloper. The database column of the table is of type Number, because of which I am encountering the eroor below. The application works fine if the database type is varchar or something else.
    I even tried changing the attribute of entity object to an integer, but this doesn't work.
    below is the error:
    oracle.jbo.PiggybackException: JBO-28300: Piggyback read error
    void oracle.jbo.JboException.<init>(java.lang.String)
    void oracle.jbo.PiggybackException.<init>(java.lang.String)
    void oracle.jbo.common.PiggybackInput.<init>(oracle.jbo.common.ObjectMarshaller, byte[])
    void oracle.jbo.client.remote.ApplicationModuleImpl.processPiggyback(byte[])
    void oracle.jbo.client.remote.ApplicationModuleImpl.executeQuery(int, boolean)
    void oracle.jbo.client.remote.RowSetImpl.executeQuery()
    void oracle.jbo.client.remote.ViewUsageImpl.executeQuery()
    void oracle.jbo.uicli.binding.JUIteratorBinding.executeQueryIfNeeded()
    void oracle.jbo.uicli.binding.JUFormBinding.executeIfNeeded()
    void oracle.jbo.uicli.jui.JUPanelBinding.executeIfNeeded()
    void fast.track.LYPanelUsermasterView.<init>(boolean)
    void fast.track.LYPanelUsermasterView.<init>()
    void fast.track.AppletUsermasterView.init()
    void fast.track.AppletUsermasterView.main(java.lang.String[])
    ## Detail 0 ##
    java.io.InvalidClassException: oracle.jbo.domain.Number; Local class not compatible: stream classdesc serialVersionUID=-7730629917230930297 local class serialVersionUID=-6507359405709672486
    void java.io.ObjectStreamClass.validateLocalClass(java.lang.Class)
    void java.io.ObjectStreamClass.setClass(java.lang.Class)
    java.io.ObjectStreamClass java.io.ObjectInputStream.inputClassDescriptor()
    java.lang.Object java.io.ObjectInputStream.readObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject()
    int java.io.ObjectInputStream.inputObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject()
    void oracle.jbo.common.PiggybackRowEntry.readObject(java.io.ObjectInputStream)
    java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
    boolean java.io.ObjectInputStream.invokeObjectReader(java.lang.Object)
    int java.io.ObjectInputStream.inputObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject()
    void oracle.jbo.common.PiggybackInput.<init>(oracle.jbo.common.ObjectMarshaller, byte[])
    void oracle.jbo.client.remote.ApplicationModuleImpl.processPiggyback(byte[])
    void oracle.jbo.client.remote.ApplicationModuleImpl.executeQuery(int, boolean)
    void oracle.jbo.client.remote.RowSetImpl.executeQuery()
    void oracle.jbo.client.remote.ViewUsageImpl.executeQuery()
    void oracle.jbo.uicli.binding.JUIteratorBinding.executeQueryIfNeeded()
    void oracle.jbo.uicli.binding.JUFormBinding.executeIfNeeded()
    void oracle.jbo.uicli.jui.JUPanelBinding.executeIfNeeded()
    void fast.track.LYPanelUsermasterView.<init>(boolean)
    void fast.track.LYPanelUsermasterView.<init>()
    void fast.track.AppletUsermasterView.init()
    void fast.track.AppletUsermasterView.main(java.lang.String[])
    Please help me out
    Thanks in advance
    null

    Hi Raman,
    This error is normally occured when there is a attribute mismatch.When you added new field in OAF page, associate this field to the new view attribute of the extended VO. It is always recommended to add this new attribute at the end
    Thanks
    Sandeep

  • Re: [iPlanet-JATO] Finding the database column length

    This is the technique I would recommend. If you'd like to wrap this
    mechanism up in the model class itself, create a subclass of QueryModelBase
    that provides such a method and use that as the base class for all your
    QueryModels.
    Todd
    ----- Original Message -----
    From: "Craig V. Conover" <craig.conover@S...>
    Sent: Friday, October 19, 2001 12:15 PM
    Subject: Re: [iPlanet-JATO] Finding the database column length
    Chidu,
    The result set that you get back is a JDBC ResultSet, not a "JATO" resultset. In ND, everything was wrapped in a "spider" data
    structure, and therefore, difficult to get to the underlying datastructure, in many cases. In some case ND made it easier to do
    certain things, and in other ways, made it more difficult or impossible(like seeing the SQL for an insert, update, delete).
    >
    Anyway, looking at the java.sql package, you can do this.
    java.sql.ResultSet rs = <jata-model>.getResultSet();
    java.sql.ResultSetMetaData rsMeta = rs.getMetaData();
    // not sure if this is what you need, but it was the closest thing I couldfind
    int colSize = rsMeta.getColumnDisplaySize(int column);
    There are numerous other methods in the ResultSetMetaData interface thatmay be of use as well.
    >
    c
    chidusv@y... wrote:
    Hi,
    How do I find out the length of a database column in a data model? In
    NetDynamics, we can do dataobject.getDataField(<field
    name>).getColumnLength(). Is it possible to achieve this in JATO
    without using a resultset?
    Thanks,
    Chidu.
    For more information about JATO, please visit
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >>
    >>
    >>
    >>
    >
    >
    >
    For more information about JATO, please visit
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >
    >
    >
    >
    >
    >
    >

    This is the technique I would recommend. If you'd like to wrap this
    mechanism up in the model class itself, create a subclass of QueryModelBase
    that provides such a method and use that as the base class for all your
    QueryModels.
    Todd
    ----- Original Message -----
    From: "Craig V. Conover" <craig.conover@S...>
    Sent: Friday, October 19, 2001 12:15 PM
    Subject: Re: [iPlanet-JATO] Finding the database column length
    Chidu,
    The result set that you get back is a JDBC ResultSet, not a "JATO" resultset. In ND, everything was wrapped in a "spider" data
    structure, and therefore, difficult to get to the underlying datastructure, in many cases. In some case ND made it easier to do
    certain things, and in other ways, made it more difficult or impossible(like seeing the SQL for an insert, update, delete).
    >
    Anyway, looking at the java.sql package, you can do this.
    java.sql.ResultSet rs = <jata-model>.getResultSet();
    java.sql.ResultSetMetaData rsMeta = rs.getMetaData();
    // not sure if this is what you need, but it was the closest thing I couldfind
    int colSize = rsMeta.getColumnDisplaySize(int column);
    There are numerous other methods in the ResultSetMetaData interface thatmay be of use as well.
    >
    c
    chidusv@y... wrote:
    Hi,
    How do I find out the length of a database column in a data model? In
    NetDynamics, we can do dataobject.getDataField(<field
    name>).getColumnLength(). Is it possible to achieve this in JATO
    without using a resultset?
    Thanks,
    Chidu.
    For more information about JATO, please visit
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >>
    >>
    >>
    >>
    >
    >
    >
    For more information about JATO, please visit
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >
    >
    >
    >
    >
    >
    >

  • How to create a variance on data that exists iIn only one database column

    How to create a variance on data that exists iIn only one database column?
    I'm trying to create a calculation to show the difference between the budgets for two different years in a Discoverer crosstab query.
    I'm using the lag function to repeat the value of a column for the current year and the year before.

    Lag and lead seems to be the only choice and they work excellent. Checkout the new 10g Database features. There is new SQL modal clause which might give additional and powerful analytics but in this case lag and lead should be sufficient.
    regards
    http://www.infocaptor.com/workbook-dump.php

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

Maybe you are looking for

  • Cube is still assigned to original system after system copy

    Hello Experts, After system copy (BW and ECC), some cubes are still assigned to the original system. Displaying the flow, the cube is assigned to the new system and the original one and the error message RSAR203 "Source system & (old one) does not ex

  • InDesign for pic in email html?

    Hi. I picked up the adobe a few months back to create business cards and fliers etc... and maybe do some photoshop things. I have the cs4 package with fireworks,bridge,photo shop,illustrator, indesign etc.... The cards and fliers worked out well. I c

  • How can i get the time to appear on my stored data in notepad

    Hi all, I was wondering how can i get the time to appear on my stored data in notepad? I saw an example before but i forgotten which example was it.. Any ideas?? holla Attachments: TextFile1.txt ‏3 KB

  • TS3367 phone does not always  ring. I have full service. All sound settings are working.

    phone does not always  ring. I have full service. All sound settings are working.

  • Error code 0XB8410E6C

    I can't get my all in one to work any more. i bought it about a month ago, had some problems getting it setup at first but eventually got it to work. every now and then it would stop working but if i shut it down and turned it backon again it would s