Validations for number fields

hallo,
i want to know whether is there any method to validate a
field that is declared as datatype number(6) if a character is inserted into that field.
i want to know other than javascripting.
also,how can i implement this validation in a table
that contains many fields of number type.

When I said, if you attempt to insert a character into a number column you'll get ORa-1722 I meant using SQL i.e. running an INSERT INTO ... statement in SQL*Plus.
6512 and 6502 error numbers.Those errors represent unhandled exceptions in PL/SQL. ORA-6512 is unhandled exception, ORA-6502 is the numeric data error.
in table,if in second row a character is entered,the readings of first row is inserted and then a error message is promptedwell that sounds screwy, but definitely a front-end problem.
we are using portal as front endThen I suggest you hie yerself over to the Portal forums. There are a number of them on the Forums Home » Oracle Technology Network (OTN) » Products » Application Server page. You'll probably what the PDK forum.
Cheers, APC

Similar Messages

  • How to make a validation for a field?

    Is any possible to make input value
    validation for a field?
    E.g. Force the user enter ItemCode in a
    correct format with proper prefix XX-BB-.... .
    If SDK is a only solution, how to do it?
    Regards,
    Kenneth

    You can't realy do it with out sdk. You could always try to right a query that will clear the code when it isn't in the correct format. then if they press add it will give an error cause there is no item code. But you'll struggle to get this right and it won't be full proof.
    In sdk in your item event you'll test if the specific edit box lost focus and before the action, if that is true then check the value. If it is not correct then bubble the event and give an error. when you bubble the event it won't do the action they wanted to do.
    Hope this helps.

  • How to create a validation on number field.

    Hello Experts,
    My database table has a numeric column EMP_ID. I want to create a validation so that a user can only enter numeric value in this field on the Apex page.
    I have tried to create validation Item/Column specified is numeric for item P2_EMP_ID.
    But when I submit the page, I still get the error ORA-01722: invalid number.
    How can I create a validation so that the ORA error is hidden from the end user and instead a custom message is displayed.
    Thanks,
    Rahul

    Rah,
    Are you on 4.0? This functionality already exists inside of apex. In fact, thats the only difference between the number field and the textfield. Once you create a "Number Field" it automatically creates a numerical validation (but you have no access to it). Likewise for setting the "Require Value" setting on a textfield; the creation of a NOT NULL validation that you can not directly manipulate.
    If you are not on 3.2 maybe you can use javascript to restrict the user from entering anything but numerical inputs.
    Alternatively, (not sure of 3.2 support) you can install the MASKED INPUT PLUGIN, and make the mask "?9999999999999" (everything after ? is optional and 9 means only numerical)

  • Validating a Number field in BC4J

    I want to make sure users get a custom error message such as "Not a number" when they try to enter a value other than a number into a Number field/attribute.
    By default, "JBO-25009:Can't create an object of type:oracle.jbo.domain.Number with value:xxx" exception is thrown.
    Trying to trap this exception in the setAttribute(Number x) method in EO doesn't work because the exception thrown before that method is called.
    I tried creating a custom validator, but it is not a solution for the same reason above.
    I finally created a 'NumberDomain' in which I check if the entry is a number and throw a JboException if it is not. The Domain's AttributeValue type is set to String although the EO attribute is set to a Number. I guess conversion is done internally. This seems to work.
    Is this an efficient solution? Is there a better built-in solution that I can implement right away without creating Domains?
    Has anyone tried creating a Domain by extending oracle.jbo.domain.Number to accomplish this?
    Thanks a lot,
    Matt

    Hi Arik,
    Thanks for your suggestions.
    you did mean the script running in the client, Yes.
    Use JavaScript validation to make sure the data really is a number.I was looking for a way to make EditCurrentRecord DataWebBean to include Javascript methods such as onChange(), onClick() inside the INPUT tags it automatically creates for the attributes. It seems that the solution is to create a custom Field Renderer by extending HTMLFieldRendererImpl and overwriting its populateForm method with a call to aForm.addInputField(..).

  • Validation for text field: Null and contains no spaces

    Currently on APEX 3.2
    I want to check 1 text field and 2 text areas to ensure they are not null and blank (hitting the space bar in the field) before submitting the page. How do I do both validations for on each field?

    I created a validation with a type of 'Function Returning Boolean' and using the following code in the expression:
    IF( TRIM( :P1_Text_Field) IS NULL
    Or LTRIM( :P1_Text_Field ) != :P1_Text_Field )
    THEN
    RETURN false;
    ELSE
    RETURN true;
    END IF;
    Edited by: Jeremy_F on Apr 12, 2012 8:15 AM

  • How to exclude Required Validation for some fields?

    Hi,
    I have a page in a form with some fields that are set as required like this:
    Field 1   Field 2
    table
    Field 3   Field4 "Add" button
    Field 5    Field 6
    "Submit" button
    There are two buttons in this form. The "Add" button is PPR allows adding Field 3 and Field 4 to the table. The "Submit" button is for the actual submission and processing. When "Add" button is pressed, I only want the require validation to be done for Field 3 and Field 4, but not Field 1/Field 2/Field 5/Field 6.
    Currently, if I press "Add" button, the required field validations are triggered for all six fields. How can I only limit the require validation to some required fields only for this button?
    Thanks
    -Mina

    subform is a great idea and kinna what I needed in this situation, but there is another challenge.
    In my case, I tried to put table, Field 3 and Field 4 in subform:
    Field 1 Field 2
    <af:subform>
    table
    Field 3 Field4 "Add" button
    </af:subform>
    Field 5 Field 6
    "Submit" button
    When I press "Add" button, Required validation still triggered for all fields. Only if I put Field 1 and Field 2 in another subform, and Field 5 and Field 6 in a different subform. Then it works like this:
    <af:subform>
    Field 1 Field 2
    </af:subform>
    <af:subform>
    table
    Field 3 Field4 "Add" button
    </af:subform>
    <af:subform>
    Field 5 Field 6
    "Submit" button
    </af:subform>
    But in my case, I need Field 1, Field 2, Field 5, Field 6 and "Submit" button to be in the same subform, as the "Submit" button applies to these four fields. In the UI design, Field 3 and Field 4 are between Field 1/Field 2 and Field 5/Field 6 though.
    Any other ideas?

  • Data validation for Date Field in Web Dynpro ABAP

    Hi ,
    In my WDA i want to perform data validation for date filed. (i.e. While creating a new record i have to check the Start Date should be always lesser than End Date.)
    If u ll enter the wrong date it should validate the Date and throw an error message.
    Please Reply soon its urgent.
    Thanks,
    Deepika

    Hi,
    First read the two attributes start date and end date.
    Then write the following condition.
    IF item_start_date > item_end_date.
    Error message.
    Endif.
    For pop up error message you need to use Create_window method of the Interface if_wd_window.
    Thanks.

  • Format issue for Number field in af:query. Is it an ADF Bug?

    Hi OTN,
    Requirement : Format DepartmentId in query panel
    I have created a view criteria from Employees table (HR Schema). I have four view criteria items called EmployeeId, DepartmentId, Firstname, LastName and all the items having validation property as Selectively Required. DepartmentId attribute have UI Hints property as Format Type = Number and Format = *0000* and Auto Submit=true.
    But in UI, I am not able to do search from af:Query panel. It works fine without setting UI Hints property Format Type* and Format
    Step 1 : Enter 123 in DepartmentId field
    Step 2 : Click Search Button
    Error : Please provide a value for atleast one of the indicated fields
    Error Screen : http://www.freeimagehosting.net/24d51
    Please check the below link for downloading the sample application
    http://formatissue.googlecode.com/svn/trunk/FormatTest/FormatTest.zip
    http://formatissue.googlecode.com/svn/trunk/FormatTest ( SVN version)
    Note:
    JDev Version : 11.1.1.5.0
    I am using ADF BC and ADF Faces Components
    Any recommendations fully appreciated
    Thanks,
    Dinil Mithra
    Edited by: Dinil Mithra on Nov 23, 2011 4:51 PM
    Edited by: Dinil Mithra on Nov 23, 2011 5:21 PM

    Please find the metadata for VO attribute and View Criteria
    <ViewAttribute
    Name="DepartmentId"
    PrecisionRule="true"
    EntityAttrName="DepartmentId"
    EntityUsage="Employees"
    AliasName="DEPARTMENT_ID">
    <Properties>
    <SchemaBasedProperties>
    <CONTROLTYPE
    Value="edit"/>
    <FMT_FORMATTER
    ResId="model.EmployeesView.DepartmentId_FMT_FORMATTER"/>
    <FMT_FORMAT
    ResId="model.EmployeesView.DepartmentId_FMT_FORMAT"/>
    <AUTOSUBMIT
    Value="true"/>
    </SchemaBasedProperties>
    </Properties>
    </ViewAttribute>
    <ViewCriteria
    Name="EmployeesViewCriteria"
    ViewObjectName="model.EmployeesView"
    Conjunction="AND">
    <Properties>
    <CustomProperties>
    <Property
    Name="displayOperators"
    Value="InAdvancedMode"/>
    <Property
    Name="autoExecute"
    Value="false"/>
    <Property
    Name="allowConjunctionOverride"
    Value="true"/>
    <Property
    Name="showInList"
    Value="true"/>
    <Property
    Name="mode"
    Value="Basic"/>
    </CustomProperties>
    </Properties>
    <ViewCriteriaRow
    Name="vcrow103"
    UpperColumns="1">
    <ViewCriteriaItem
    Name="EmployeesViewCriteria_vcrow103_EmployeeId"
    ViewAttribute="EmployeeId"
    Operator="="
    Conjunction="AND"
    Required="SelectivelyRequired"
    GenerateIsNullClauseForBindVars="false"/>
    <ViewCriteriaItem
    Name="EmployeesViewCriteria_vcrow103_DepartmentId_EmployeesViewCriteria_vcrow103_DepartmentId_itemHolder_vcrow105_DepartmentId"
    ViewAttribute="DepartmentId"
    Operator="="
    Conjunction="AND"
    Required="SelectivelyRequired"
    GenerateIsNullClauseForBindVars="false"/>
    <ViewCriteriaItem
    Name="FirstName"
    ViewAttribute="FirstName"
    Operator="CONTAINS"
    Conjunction="AND"
    Required="SelectivelyRequired"
    GenerateIsNullClauseForBindVars="false"/>
    <ViewCriteriaItem
    Name="LastName"
    ViewAttribute="LastName"
    Operator="CONTAINS"
    Conjunction="AND"
    Required="SelectivelyRequired"
    GenerateIsNullClauseForBindVars="false"/>
    </ViewCriteriaRow>
    </ViewCriteria>

  • Struts validator for two fields(conditional required)

    Have a Drop down and an input field.
    When user selects "Type 1" from drop down only then the input field is required. otherwise it's not a required field.
    Looking at the validator guide in struts maybe I have to create a new validator rule which should check if drop down value "Type 1". But not sure how to code to say that the input field is required here.
    How to do this?
    Thanks.

    Yes you have to check for drop down value "Type 1".
    when you hit on submit it goes to the validation function right ...
    there add a condition. Check if tpe 1 is selected , if so proceed validation the text box , else skip that validation and come out.

  • Important : how to create a  validation for table field.

    Hi all,
    I have created a table in which i have date field of format MM/DD i.e char 5.
    i want validation that if user creates a entry in date field then if he enters first two digit more then 12 then validation must be their that please enter first 2 digits from 1-12.
    similarly for last two digitsi.e it must be from 1-31
    so how can i provide this validation.
    if u have any confusion in understanding the query please revert.

    Declare 3 variables
    DD(2) type char
    MM(2) type char
    Temp(2) type char
    Date(5) type char
    Get the DD and MM value from your date field
    if MM > 12.
        temp = MM.
        MM = DD.
        DD = temp.
    endif.
    Then concatenate MM & DD into date and save
    Hope it helps!
    Regards,
    Ashok

  • Activating F4 help/Validating for a field added to SRM shopping cart screen

    I have added Profit Center as an additional field on the Shopping Cart Screen. This should be displayed only when the user selects Cost Center as value for another input field. Also I need F4 help for this profit center.
    Can someone please guide me with the steps to do the same.
    Thanks and Regards,
      Vanessa

    Hi Vanessa,
    Validation can be done in doc change and doc check BADIs.
    For attaching F4 help you can create a search help in ABAP Dictionary and attach that serach help to your cutom field .
    Hope that helps,
    Anubhav

  • Date format(for number fields)

    Hi there.
    I'm creating some sql queries wich will be executed by some users throught the Oracle client PL/SQL, and I need to format some fields in date format.
    Those fields are NUMBER(8) and they are in that format: "YYYYMMDD"
    The format I want to put that information is: "DD.MM.YYYY".
    What's the easiest way to do that?
    The version that I'm using is Oracle 9.2.0.4.0.
    Thanks by the way.

    Hi,
    Use TO_CHAR to convert the number to a string,
    use TO_DATE to convert the string to a date, then
    use TO_CHAR to format the date.
    TO_CHAR ( TO_DATE ( TO_CHAR ( numeric_column
                                , 'fm00000000'
                      , 'YYYYMMDD'
            , 'DD.MM.YYYY'
            )This shows why storing dates in some other kind of column is a bad idea.

  • Validation for Amount fields..very urgent

    hI ALL.
    I want Validation like     Right justify amount decimal point and 2 decimal places.
    this is Work area
    TYPES: BEGIN OF T_DATATAB,
              COL01(60) TYPE C,
              COL02(60) TYPE C,
              COL03(60) TYPE C,
                end of T_datatab.
    data: g_t_dbt like table of dbt initial size 10,
          wa_dbt type dbt.
    DATA : VAL TYPE STRING.
    Now i want  move value from VAL to wa_DBT-CURRENCY as follows,
            move wa_datatab-col07 to wa_DBT-CURRENCY.
            MOVE VAL TO wa_DBT-CURRENCY.
    so if i give input  100, i need display like 100.00
    Help me
    helpful answers will be get rewarded.it is very urgent
    Regards.
    Bhanu
    Message was edited by:
            bhanu

    Hi bhanu,
    1. simple
    2. just use
      WRITE numberfield to charfield.
    (it will put the field
       in the SAME FORMAT as DISPLAY FORMAT)
    eg. YYYYMMDD  will put as dd.mm.yyyyy
        256 will put as 256.00
    regards,
    amit m.

  • Validation for a extension field in the BAPI ( BAPI_ACC_DOCUMENT_CHECK)

    Hi,
    I am working on an in terface for upload of data in journal ledger(FB50)
    Actually i need to validate a field which has been included in transaction FB50 as an enhancement based on customer need .
    a function module was created as suggested in note 487722 earlier but now we require to validate that field(transaction type) as i am using this BAPI in an interface for journal ledger posting FB50 for data validation of the file data.
    this field has been populated as a part of the extension parameter in the bapi -
    (( BAPI_ACC_DOCUMENT_CHECK)
    field values for this field have been passed in the business transaction.
    but i am not sure where to code the validation for this field .
    could anybody suggest if we need to do it in include ZXACCU15 .
    if so then how do we populate the values for the return parameter.
    i am post ing document using IDOC and need to generate the for the errors generated.
    it already shows for all the standard fields of the transaction.
    Its a bit urgent,
    help wud be appreciated
    jy

    Hello Jy
    The following coding shows how to evaluate the existence of the transaction type in table T856 and how to create the corresponding BAPI message (using function module <b>BALW_BAPIRETURN_GET2</b>):
    *& Report  ZUS_SDN_BAPIRETURN_GET2
    REPORT  zus_sdn_bapireturn_get2.
    START-OF-SELECTION.
      " Call BTE function within BAPI (actually OPEN_FI_PERFORM_RWBAPI01_P
      " calls the z-function module)
    **  CALL FUNCTION 'Z_FI_INTERFACE_RWBAPI01'
    **    TABLES
    **      c_accit           =
    **      c_acccr           =
    **      c_return          =
    **      c_extension       =
    **      c_accwt           =
    **    changing
    **      c_acchd           =
      " Coding within your BTE function module:
      DATA:
        ls_return    TYPE bapiret2.
    * transaction type
      READ TABLE it_accit INTO ls_accit
           WITH KEY posnr = ld_posnr.
      CHECK ( sy-subrc EQ 0 ).
      ld_tabix = sy-tabix.
      ls_accit-posnr = ld_posnr.
      ls_accit-rmvct = ls_bapi_extension-field3.
      MODIFY it_accit FROM ls_accit INDEX ld_tabix.
    " Validate existence of transaction type
      SELECT SINGLE * FROM  t856 into ls_t856
             WHERE  trtyp  = ls_accit-rmvct.
      if ( syst-subrc ne 0 ).
        " Note: the following IF condition looks apparently strange yet its primary
        "         use is to ensure that the Where-Used-List for message 014(GC)
        "         will find our function module
        if 1 = 2.  MESSAGE e014(gc) WITH ls_accit-rmvct.  endif.
    *   Transaction type & is not defined
        clear: ls_return.
        ls_return-message_v1 = ls_accit-rmvct.  " type conversion
        CALL FUNCTION 'BALW_BAPIRETURN_GET2'
          EXPORTING
            type             = 'E'
            cl               = 'GC'
            number           = '814'
            PAR1             = ls_return-message_v1
    *       PAR2             = ' '
    *       PAR3             = ' '
    *       PAR4             = ' '
    *       LOG_NO           = ' '
    *       LOG_MSG_NO       = ' '
    *       PARAMETER        = ' '
    *       ROW              = 0      " ld_tabix
    *       FIELD            = ' '    " RMVCT
          IMPORTING
            RETURN           = ls_return.
        APPEND ls_return TO c_return.
      ENDIF.
    END-OF-SELECTION.
    The advantage of using the function module over directly filling the BAPIRET2 message variable is that the function module generated the message text (field BAPIRET2-message = 'Transaction type '<type>' is not defined').
    Regards
      Uwe

  • ISA order.jsp; message and validation for "Your reference" field

    Hi Everyone,
    I am new to ISA and working on java program to add message to "Your Reference" field in order.jsp page if this field is empty and clicked on "Check Out" button and user need to remain in the same page until user enters information in this field.
    Message is available in .xlf file.
    Please suggest me where to write this code for both message and validation for this field.
    Thanks in advance
    Prasad

    I fixed the requirement
    thanks
    Prasad

Maybe you are looking for

  • Citi EO office FAILURE

    applied for the Citi Simplicity card and was approved for sli of $1800, my lowest since the start of my credit journey. I want to turn it down but not sure. HELP

  • Notify/Wait or Observable/Observer?

    Hi, I have one thread process the data and store the result in a data object. Several threads access the data object to display. Which one to use: 1) Have the processing thread notify the display threads when it's done? Using thread wait()/notify()?

  • I buy The Ipad 4 generation and they don't know ID and password

    I buy this Apple Ipad 4 generation online and the seller dosen't know the Apple ID and also the Password What I can do?

  • Problems completing update to IOS 5.1

    I used my home WiFi to do an update to IOS 5.1.  It took longer than I expected...about 1/2 hour.  Then I got a box on the screen with the spinning wheel of death and the message "verifying update"  The problem is that I have had that message for the

  • FlexPMD View not displaying results Eclipse 3.6

    Below are the relevant software installations. FlexPMD is configured as defined in the documentation. When running FlexPMD, it appears to be churning away, however, there are no results that appear in the FlexPMD View window. Is this an issue only wi