Validation to check the length of point

Greetings,

I have a column that is defined with a length of 240 in the table, and I want to give a validation error if the user types more than 240 in the corresponding point on the Apex page. I have this code in my validation routine and it is listed as PL/SQL:
TO_NUMBER (LENGTH (:P10_ACTIVITY_COMMENT)) < 241

When I save a record with a comment more than 240 the validation error, but an Oracle error also shows at the top of the page:
"Invalid PL/SQL expression condition: ORA-06502: PL/SQL: digital error or value: character conversion number expression invalid PL/SQL condition error: ORA-06502: PL/SQL: digital error or value: character of number conversion error."

I changed the code in several different ways, but they all give the Oracle error.

How should I code it?

Thank you, Tony

Tony - my mistake. When I saw my answer here, I saw the double quotes. However, they are good apostrophes, so this isn't the problem. The next thing to do is to run the page in debug mode and look at the HTML code in the browser. You should see something like this:

Scott

Tags: Database

Similar Questions

  • How to check the length of the string (from viewobject) attribute on jspx?

    Hello

    JDEV: 11.1.1.4

    I use the component of the carousel, inside, I use the Description attribute to display the content about to carousel,
    Now, I want to display a link as well, whenever the length of the description is longer than 150 characters.

    Currently backing bean that I am setting the property chklength to true or false, but the problem, the length is that I need a partial target
    and that's my Carousel component I get updated every time... is possible to check the length in page jspx itself inside the vissible property

    This is my code
    <af:outputText value="#{item.bindings.Descrip.inputValue}"
                                                             id="ot49"/>
                                               <af:commandImageLink text="more.." id="moreid" shortDesc="click to see more.." 
                                                                     visible="#{pageFlowScope.chklength}">
                                                <af:showPopupBehavior popupId="::p1"/>
                                                </af:commandImageLink>              
    Thank you
    Guillet

    You can try with # instead of $?

    visible = "#{FN: length (Item.Bindings.descrip.inputValue) > 150} '"

    Thank you
    Nini

  • DRM validation to check the existence of nodes in a different hierarchy as a property value

    Hello gurus,

    I have two hierarchies, named A and B respectively. I need to create a validation for nodes in A hierarchy that checks the value of a property such that the node must have the property value equal to any node name in the hierarchy B.

    Means that the values for this particular property for the nodes in A hierarchy must exist as a node in the hierarchy B.

    It would be very grateful if someone can give an idea to achieve this.

    Hello

    Try this in a type formula validation-

    NodeInHier (PropValue (Custom.PropName), B)

    This returns false if the value of the property is not a node in the hierarchy B and True if it's.

    So, you will get a validation message whenever the property is loaded with a value that is not a node in the hierarchy of B.

    Thanks, let me know

    Denzz

  • EditField listener to check the length of the field

    I have a phone field which is an editfield.

    I could restrict entry to 10 digits in this field to hold mobile digital values.

    But now I want to add an additional post that throws an error dialogue once the user typed a value less than 10 in this area.

    This action must be triggered as soon as the user has typed something and went to the next field.

    Here is my code:

    LabelField lbl1 = new LabelField(" Phone No:            ");
    
           final EditField TextField2 = new EditField("", "", 10, 0)
           {
              //Some statements
           }
    
    TextField2.setChangeListener(new FieldChangeListener()
            {
              public void fieldChanged(Field field, int context)
              {
                  if(TextField2.getText().length() < 10)
                              System.out.println("Please enter a valid 10 digit mobile number!");
              }
            });
    

    Help, please. Thank you.

    As @simon_hain said, let me quote myself: "you must override the onUnFocus method.

    protected void onUnfocus(){  if(getText() == null || getText().length() < 10)    Dialog.alert("Text too short!");}
    
  • Form validation to check the areas

    Hello - is there a way to check (and reject) certain fields in a form input?  We have an internal newsletter we want to allow employees to participate in, but do not want to use personal emails (gmail, hotmail, etc.).  Is this possible?

    Hi Eric,.

    Two options:

    1 if you want just user to be alerted or encourage notification of error such as field validation, you can take a list of e-mail field externsions, put it in a table in a function javascript/Jquery and not allow those for the presentation. This can lower your form submission, in which case the user is not able to submit the form with the public/staff email addresses. In this case...

    2. you can choose the stage of processing "Update contact data of the form" in forms, make conditional, and in the condition you can choose the field domain email address and not exactly as criteria, choose the static value and enter the condition that e-mail domain (hotmail.com, yahoo.com, etc.) for each e-mail domain. See the image below:

    I hope this helps.

    Thank you

    Amit Pandya

  • How to check the length of a string?

    I want to basically create a < cfif > statement that said:

    cfIf #variable # is = to 8 length

    result

    cfelse

    result

    I've tried a few things, but none seems not to work. can someone help me with what it might look like?


    result Yes

    result no

  • Display the length of the queue of CPU

    We are currently troubleshooting problem in our environment, and a step which was recommend is to check the length of queue CPU to our guests.  Unfortunately, I do not know how to do this in ESX 4i.  Can anyone help by explaining the steps to access this information?

    Hello Andrea, just connect to your server via ssh esxi or use the direct console (DCUI), in which case you use the DCUI by pressing alt + F1 which will open the shell it will look like this:

    In case you don't use esxi 4.1 that you enter not 'supported '.

    Once you are in the shell, follow this procedure:

    step 1-. Enter the command: esxtop

    step 2-. Press the letter 'c' (it will change your point of view to CPU stats).

    step 3-. Once you are on the view of stas CPU hit the 'V' (capital V) which will filter your cpu stats just for vm (process) worlds.

    the % RDY is the length of the queue for the processor (means that vm waiting to be programmed on a procesor/core). in this way, you can check the length of queue of cpu on your virtual machines, to the previous view (view CPU), you can check the % RDY for system services.

    Kind regards.

    If you find this information useful, please give points to "correct" / "useful."

    My blog virtualizacion you en idioma

  • Increase the length of the column - restriction key foreign vs MS SQL

    Hello

    I need to increase the length of the column (nvarchar) in some tables. Between these tables are foreign keys.

    When I try to do it on MS SQL databases using the command as "ALTER TABLE TABLE_NAME ALTER COLUMN column NAME NVARCHAR (50) NULL" then I get the error like below:

    Column ' dbo. TABLEA. NAME ' is not the same length or scale as the referencing column or the 'FKNAME' object depends on the column 'name'.

    Therefore resume, on MS SQL I drop all constraints, alter table and re-create constraints.

    When I do this same thing on the oracle database (oracle database a same pattern as MS SQL database, same fk, same tables, columns, etc.) using the command as "ALTER TABLE table_name MODIFY COLUMN NVARCHAR2 (40);  " then length is change without any erros and I wounder t - it a correct situation on oracle? -all the constraints are enabled. Oracle checks the length of data to foreign key columns?

    As I understand the error (ORA-02267: column type incompatible with the type of the referenced column) is the show that if the data type name is not equal between data tables not type length (?)

    To reproduce:

    1 create tables

    CREATE TABLE "TABLEA".

    (ACTIVATE THE 'NAME' NVARCHAR2 (20) NOT NULL,)

    NUMBER OF "TEXTID",.

    'PK_TABLEA' CONSTRAINT PRIMARY KEY ("NAME")

    );

    CREATE TABLE 'TABLEB.

    (SELECT 'ID' NUMBER NOT NULL,)

    NVARCHAR2 (10) "NAME."

    NUMBER OF "WWW."

    "TABLEB' ('ID') PRIMARY KEY CONSTRAINT

    );

    2. create the fk

    ALTER TABLE TABLEB ADD CONSTRAINT FK_TABLEB FOREIGN KEY ('NAME') REFERENCES 'TABLEA' ('NAME');

    On MS SQL, you get an error message on the same length of column ;) no

    Thank you

    Best regards

    Mateusz

    Whatever it is, the answer seems to be here: https://docs.oracle.com/cd/E17952_01/refman-5.5-en/create-table-foreign-keys.html

    "Corresponding columns in the foreign key and the referenced key must have similar data types. The size and the sign of the integer types must be the same. The length of the string types are not necessarily the same. For the non-binary (character) string, the character set and collation columns must be the same. "

  • Checking the negative value

    Hey guys I have a result on the ground which is of type varchar, but it stores numbers. I want to check if the value is negative or not. The code below works perfectly except for 1 case where the result has only ' - '. -indicates a missing value not a negative... How this can be fixed. Here is my code snippet.
    -Search for numeric values
    IF (trim (TRANSLATE (resvalue,'+ -. 0123456789', ' ')) IS NULL) THEN
    -Look for the negative value if the value is numeric
    IF (substr (resvalue, 1, 1) = '-' AND substr (resvalue, 0, 1) is not null) THEN
    v_ret_msg: = v_result_name | "" A negative result. "

    Also check the LENGTH of resvalue.
    That is to say:
    If length (resvalue) = 1 and substr (resvalue, 1, 1) = '-' then...

  • How to limit the length of a text field in a dialog box (ADM)

    Hi all

    I need to limit the length of a field in a dialog box (ADM) edit_text, but char_limit doesn't seem to work, it's my code the problem ?

    {
    char_width: 8.
    height: 100,.
    item_id: 'Rete ',.
    type: 'edit_text. "
    Multiline: true,
    char_limit: 5.
    Width: 500,
    }

    If not, maybe I can use events to do the same thing with the onKeyStroke event but I don't know how to use the event in a dialog box (ADM) or if it is still possible...

    Any idea?

    Thank you for your help.

    Phil

    There are two events that can be used to check the length of the text,

    The first is the action event for the text field, which is called when the field loses focus, it is a member of the purpose of dialogue with the same name as the item_id.  This event could also be used to update another field in the dialog box that indicates the number of characters, you may even have a small picture of alert which becomes visible to make it obvious that there is a problem.

    The other event, as already mentioned, is the validate event.  This allows to block the exit from the dialog box and display a popup to alert to the user.

    You will find some examples of dialogs here:

    http://www.pdfscripting.com/public/65.cfm

    Take a look at the pages resize tool dialog box.  It will give you some ideas of what can be done.

    There is a plug-in Acrobat for creating dialogs here:

    http://www.windjack.com/products/AcroDialogs.html

    It's a Visual drag and drop Editor.  You can download and use for free for 10 days.

    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com

    The Acrobat JavaScript Reference, use it early and often
    http://www.Adobe.com/devnet/Acrobat/JavaScript.html

    Then more important JavaScript development tool in Acrobat
    The Console window (video tutorial)
    The Console Window (article)

  • Limit the length of the file name of the file to download in a file.

    Hello

    I got a file navigation item. When the file name is 74 more characters, he goes to an error page. Can this be avoided?
    To avoid this, I tried to use a javascript script
    function doSubmitWithProgress()
    {
    If {(document.getElementById('P202_FILE_INPUT').value.length > 70)
    Alert ("file name must be less than 70 characters.'");
    Object.Focus ();
    }
    on the other
    {$x_Hide ('wwvFlowForm');
    $x_Show ('InProgress');
    doSubmit ('UPLOAD_FILE');
    }
    }
    But consider the path of the file as well and therefore to cause a problem.
    So could you please help me with this problem.
    If there is a way to avoid going to the error page if the name of the file is big, that would be great. Otherwise, if there is a way to check that the length of the file name and trigger an alert if it is larger than 70 characters, that would help me also.

    Thank you
    Vignesh

    Vignesh,

    You can use the javascript str.split ()* method to break down the full path in a table of its individual parts and then check the length of the last piece (which ends up being the name of the file).

    For example.

    function doSubmitWithProgress()
    {
      // Create a variable to hold the full file name with path
      var fullFileName = document.getElementById('P202_FILE_INPUT').value;
    
      // Now create an array that contains the individual pieces of
      // the file name split on the "/" boundaries
      var myArray  = fileName.split('/');
    
      // The last variable contains the length of the last item in the array
      // which ends up to be our actual file name.
      //
      // NOTE: We have to use myArray.length-1 because JavaScript
      // Arrays start at 0
      var fileNameLength = myArray[myArray.length-1].length;
    
      if (fileNameLength > 70)
      {
        alert('File name should be less than 70 characters in length.');
        object.focus();
      }
    else
      {
        $x_Hide('wwvFlowForm');
        $x_Show('InProgress');
        doSubmit('UPLOAD_FILE');
      }
    }
    

    Hope this helps

    Doug Gault
    [SUMNEVA.COM | http://www.sumneva.com/]

  • Firefox spell check feature began to point out almost all of the words, regardless of if the words are correctly spelled.

    Firefox spell check feature began to point out almost all of the words, regardless of whether the words are spelled correctly.

    Tried to download and reinstall Firefox 3.6.8 but the same thing happens.

    Tried different web pages to see if it was a feature of a particular Web site, but it happened while I typed this entry in a field on a Mozilla Web site page.

    Such a shame, apart from the extensions topic spelling is one of my favorite features of Firefox!

    Can you tell what dictionaries were causing this issue?

    Only the selected dictionary has an effect.

    You can see which dictionary is selected if you right click in a text box and open the submenu language.

    Also make sure that [[X] "Check spelling" in the right click menu context has a tick.]

    Alternatively, you can try to move on the items 'Check spelling' and the new.

    See http://kb.mozillazine.org/Spell_checking and How to use the spellchecker of Firefox?

  • check the installation of directx valid message on Skype

    original title: directx

    I have a problem that I try to make a video call on Skype, I get message 'check the valid installation of directx' how check it out or fix it?

    Hi John,.

    (1) if it works well before?

    (2) remember to make changes?

    (3) what version of Windows you are running on the computer?

    It is sufficient to indicate the complete error message you receive.

    You can follow the steps given by Azeez N and D of Diana in the links below that addresses this issue

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-hardware/cant-start-video-renderer-check-you ' ve-got-a-valid/3cb8e374-8cea-4722-b094-9bfcfd11bca6

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-hardware/how-to-check-if-you-have-a-valid-DirectX/1282d473-99f7-49f0-9f86-54227a2dbfea

    If the problem persists, please contact Skype more specialized.
    http://www.Skype.com/intl/en-us/support/user-guides/

  • What tool can be used to check the validity of the drivers

    original title: drivers

    does anyone know of a utility driver... free preferbly :)... outside the windows update that checks the validity of the drivers with a repair with a single click to delete / update etc... Thank you

    Hello

    To add the good advice of T.G.:

    Automatic driver update programs often fail, and when this happens, the results can be a nuisance
    to a disaster. Manual update of the pilots is my preferred method.

    Maybe need of these:

    This utility, it is easy see which versions are loaded: (this is not an automatic update of the driver
    It just allows you to easily see information on the drivers of program.)

    -Free - DriverView utility displays the list of all device drivers currently loaded on your system. For
    each driver in the list, additional useful information is displayed: load address of the driver, description,.
    version, product name, company that created the driver and more.
    http://www.NirSoft.NET/utils/DriverView.html

    For drivers, visit manufacturer of emergency system and of the manufacturer of the device that are the most common.
    Control Panel - Device Manager - Display Adapter - note the brand and complete model of your
    video card - double - tab of the driver - write version information. Now click on UPdate Driver (this
    cannot do anything as MS is far behind the certification of drivers) - then do a right click - Uninstall - REBOOT
    This will refresh the driver stack.

    Repeat this for network - card (NIC), Wifi network, sound, mouse, and keyboard if 3rd party with their
    own the software and drivers and all other main drivers that you have.

    Now go to the site of the manufacturer of system (Dell, HP, Toshiba as examples) (restoration) and then of the manufacturer of the device
    (Realtek, Intel, Nvidia, ATI, for example) and get their latest versions. (Look for the BIOS, Chipset and software)
    updates on the site of the manufacturer of the system here.)

    Download - SAVE - go to where you put them - right click - RUN AS ADMIN - REBOOT after each installation.

    Always check in the Device Manager - tab drivers version you install actually shows up. This
    because some restore drivers before the most recent is installed (particularly that audio drivers) so install a
    pilot - reboot - check that it is installed and repeat if necessary.

    Repeat to the manufacturers - BTW on device at the DO NOT RUN THEIR SCANNER - manually check by model.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    How to install a device driver in Vista Device Manager
    http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.html

    If you update the drivers manually, then it's a good idea to disable the facilities of driver in the Windows updates,
    This leaves ONE of Windows updates, but it will not install the drivers who are generally older and cause
    questions. If updates offers a new driver and then hide it (right click on it) and then go look for new ones
    manually if you wish.

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    Hope these helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • Solutions error checking the disk and Restore Point, pointing to the other.

    Yesterday, my wife picked up the package of virus Security Suite from somewhere and remove, I picked up an error when the disk check runs at startup. Check disk claims it is an error, check the drive and suggests restore since my last restore point. But when I do this, restore the system claims I have a disk error and I need to run the disk check. Which brings me right to the beginning of this problem.

    I'm running 32-bit Windows 7 Home Premium, and have enabled the Windows updates. I use AVG and Malware Bytes to protect my system.

    Thank you!

    Bill Haworth

    You can run check disk from safe mode? This is a level of command prompt:
     
    CHKDSK x: /F /R
     
    Where x: is the drive that you control.
     
    "bill_haworth" wrote in message news: 9c836e2b-b164-44a7-b516-5d5302cca9bf...
    > Yesterday, my wife picked up the package of Security Suite virus from
    > somewhere and back, I picked up an error when running the disk check to
    > start. Check the disk says there is an error, check the drive and
    > suggests restore since my last restore point. But when I do
    >, System Restore claims I have a disk error and I need to run
    > Check the disc. Which brings me right to the beginning of this problem.
    >
    > I am running 32-bit Windows 7 Home Premium, and made Windows updates
    > on. I use AVG and Malware Bytes to protect my system.
    >
    >
    >
    > Thank you!
    >
    > Bill Haworth
    >
     
     

Maybe you are looking for

  • Resound LiNX2 Firmware 961

    I will get my first pair of hearing aids,2 961 LiNX RIE, 20 Sept. Pending this installation, I did my homework, including by participating in these forums of Apple on this topic.  Firmware seems to be a recurring topic here I'm worried. It seems that

  • Skype for business calls

    Hi, I have a problem with Skype for business. On the company, we share a phone number for the Conference call by features of the iphone or samsung (4-5 people), a few minutes, someone we have to drop the call and then another... and another, I have n

  • How can I remove the split screen option when you open an attachment on the email?

    I had used the option of screen split using strong control of the two tabs on the toolbar at the bottom of the screen and right click for the split-screen option.  Now, when I open an application such as Internet explorer, it happens in the split scr

  • Delete a restore point is dated in the future.

    My time system had error default next month. (Today, it's the 4th Nov - the date system was fixed for December 4) When the created sytem one automatic restore point, it was created on 4 Dec - the wrong date. It is causing me to get safety alerts to m

  • Trying to save photos. Get the message that the backup was unsuccessful. Any ideas?

    I didn't save my photos previously.  Would it be too many for the disc?  If so, how can I put them on several disks?