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

Similar Messages

  • Eliminate printing Border for Text Field???

    Is it possible to display border on the PDF and not print on the output for Text Field??? What settings and/or scripting I need to get this working? A sample form is really appreciated.

    If you use the standard border (for example), you can use the JavaScript prePrint and postPrint for each field to make the border visible, and hidden. Here's how.
    1.) Highlight Text Field in Designer.
    2.) In the Script Editor, select the prePrint Event from the dropdown list on the top left. (This works in FormCalc or Javascript, although I tend to use JavaScript as the language in the right hand drop down)
    3.) Type in (or paste) the following code:
    this.border.presence = "hidden";
    4.) Select the postPrint Event.
    5.) Type in (or paste) the following code:
    this.border.presence = "visible";
    Now when you click print, it will make the outside border hidden, and when you cancel, the border will reappear. Now this will not make the 'Solid Box', or 'Sunken Box' of the text field hidden. The easy way to fix this, is set the 'Appearance' in the Object->Field palette to 'None'.
    Cheers!
    Jay

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

  • HT1311 I have done all of the above but when I try to update my Apps it still says that my ID is not valid for the US store and I must switch to the UK? My settings already say I am with the UK? What do I do?

    I have done all of the above but when I try to update my Apps on my iphone it still says that my ID is not valid for the US store and I must switch to the UK? My settings already say I am with the UK? What do I do?

    ok well like lllaass said, most apps require 4.3 or later iOS software. chances are since the apps worked before, the apps themselves got updated and will no longer work with your software version.

  • Need to set default values for the fields plant and location in ME21N

    Hi All,
    i need to set default values for the fields plant and location in ME21N tcode.
    In accout assignment if we give 'A' then we need to create asset by clicking the Asset tab,there you have the fields plant and location.
    How to resolve this?
    Thanks in Advance

    hi .
    i needed to set default strorage location and plant in personal setting  in me21n.
    i solve it with this way.
    go to program SAPLMEPERS in se38.
    create new function in output with the sample name :MODULE ZTEST_001 OUTPUT.
    in this module write:
    if MEPOITEM_PROP-WERKS is INITIAL and  MEPOITEM_PROP-LGORT is INITIAL.
    MEPOITEM_PROP-WERKS = '1000'.
    MEPOITEM_PROP-LGORT = '0032'.
    endif.
    this is the solution.
    best regards.
    maryam

  • How can I put validation for JTextField when gotfocus and lostfocus

    Hi,
    How can I put validation for JTextField when gotfocus and lostfocus ?
    Thanks
    Wilson

    You add a focusListener to the control you wish to monitor. In the focusLost() handler you do whatever, in the focusGained() handler you do whatever.

  • Looking up data and validating a text field

    Hi All,
    Ran into an issue with a Application Express system i support, there is a table inside a database with department codes. HG and JW. what i need to do is look up the department code and validate a text field, for example, if the user enters "HG" or "JW" then the form can be submitted. i got told it was PLSQL in the "Page Processing" Page
    Sorry for the bad descrpition, im a complete beginner to Application Express
    Thanks,
    Sam

    940648 wrote:
    Hi All, Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "940648".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    Ran into an issue with a Application Express system i support, there is a table inside a database with department codes. HG and JW. what i need to do is look up the department code and validate a text field, for example, if the user enters "HG" or "JW" then the form can be submitted. i got told it was PLSQL in the "Page Processing" Page
    Sorry for the bad descrpition, im a complete beginner to Application ExpressTake the <i>Oracle® Database 2 Day + Application Express Developer's Guide</i> tutorial in order to understand basic APEX techniques and terminology.
    What you're looking for is Validation.
    This is covered in the Oracle By Example tutorial: Building an Application using Oracle Application Express: Part 1

  • Validating a text field

    Hi guys,
    My apex version is 3.2 and I am trying to validate a text field to make the user type only English letters and I am using PL/SQL expression:
    REGEXP_LIKE(:P6_EMP_FAMILY_NAME,'[a-z,A-Z]$')That prevents the user from typing Arabic letters or Numbers in the text field. The thing is it works but some time it doesn't for example:
    1- If the user types Numbers or Arabic letters inside the text : XXXXX11234XXXX it doesn't work.
    2- If the user types Numbers or Arabic letters at the beginning of the text: *1234XXXXXX* it doesn't work
    Other that that it do
    Am I doing something wrong?
    Please help
    Thank You

    I'm trying to add NOT NULL condition in the code i tried:
    IF :P6_EMP_FAMILY_NAME IS NOT NULL THEN
    EGEXP_LIKE(:P6_EMP_FAMILY_NAME,'^[a-zA-Z]*$');
    END IF;it seems that this is not working.
    where did missed up.
    Thank You
    ==========================================
    fixed that you can add a condition the validation without tempering with the code didn't see that :)
    Thank You
    Edited by: Montherz on 14/11/2011 04:40 ص

  • Need a JavaScript to enable/view Multi-line option for Text fields.

    Hello All,
    I need a JavaScript to enable/view Multi-line option for all the Text fields in PDF Form.
    Assume that I have a PDF form of Fields from F1 to F100 and it contains 25 Checkboxes, 25 Combo Box and 50 Text Fields. Now i need a javascript for which i need to enable Multiline for only Text Fields. So Is there any JS for which i can enable the Multiline option for only Text fields and not for ComboBox or Checkbox.

    Hi timo,
    Thanks for your help. iam trying to use the iteraor approch to do this. but i don't know how to fetch the data entered in the form that was built by the iterator. can you please tell me .
    thanks

  • Need to add superscript for text field--HELP NEEDED.

    Hi Friends,
    Is there any way to implement superscript and subscript text in Crystal?  For example, I would like to superscript the portion (1) of the following string:
    "Buy(1) or Sell(1)"
    The only way I have found to do this is to put the "235" in a separate text field that uses a smaller font size, and overlay it into the gap that I intentionally left in the larger text field.  For display and printing purposes, this works OK, but if a report containing these strings is exported to Excel, the text fields are exported as separate cells, which makes the exported report look funny.
    I can create this string in Word, then cut and paste it into a text field in Crystal (which initially seems to work), but as soon as I click off the field, all the characters in it are converted to the same font size.
    If this can't be done in the current version of Crystal, are there any plans for it to be implemented in future versions?

    hello all,
    the text interpretation for html or rtf in fields will not render superscript or subscript. the basic rule is that whatever you can format directly in a crystal reports text object, that's what you can have interpreted.
    look up "text interpretation html" in kbase for a full list.
    one option is to turn html passthrough on the server in question if this is a huge deal for you...if you want instructions on how to turn html passthrough on, they are located in the webelements user guide at
    http://diamond.businessobjects.com/node/255
    after doing so, you'd drop the database field into a formula and any html in the database field would be interpreted.

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

  • Dual Color for Text field

    Hi
    I want to display 2 and more data fields in one line and have created as text field which would appear as Heading on each page (centralised in line)
    like
    Name (Age)
    Keith Roan (40)
    Jeff Shane (30)
    Peter Andrews (30)
    Kamal Chawla (30)
    Is there a way by which I can display name and Age in different colors and still keep the centralised setting for both as a SET.
    1 way is to have them as different fields (name on left - right aligned and age-left aligned),  but their position would change i.e The age would appear at same place always and Name would shift depending on the length and it would not truely be centralised settings.
    Thanking you in advance
    Kamal

    Insert both the fields Name and Age on the report and right click>format field>font-->select the color
    After changing the colors of both the objects now insert a text object and right click on Name field and cut it and edit the text object and paste it. Do the same for the other field Age and place it in the same text object.
    Hope this helps!
    Raghavendra

  • For loop for text field

    5 check boxes are A, B, C, D, E and 3 text fields are Text1, Text2,  Text3.
    If any check box is marked, corresponding value(A,B,C,D or E) will be goes into Text1, Text2 or Text3.
    It may be output like this
    Text1= A
    Text2= E
    Text3= C
    I have placed a code under checkbox A: mouc up:
    var aList = new Array("Text1.0","Text1.1","Text1.2");
    for(i = 0; i < aList.length; i++)
    if(this.getField("CheckBox4").value = "1" && this.getField(aList[i]).value=="") {
    this.getField(aList[i]).value = "A";
    I do not get check mark when click on check box and "A" value is going into all text fields- Text1.0=A, Text1.1=A, Text1.2=A.
    What should I do?

    Yes A, B, C, D, E are check box. When I replace to this.getField("A").value == "1", it does not work. I have placed in the On Focus. I am not sure where is the perfect.
    Actuall issue is that there are 5 checkbox name A, B, C,D,E. and 3 text field named Text1.0, Text1.1, Text1.2.
    If user check A, textfield automatically filled with "A" (into any one text Field of three text Field)
    If user check C, textfield automatically filled with "C" (into any one text Field of three text Field)
    If user check D, textfield automatically filled with "D" (into any one text Field of three text Field)
    So output may be like this:
    Tex1.0= A
    Tex1.1= C
    Tex1.2= D
    again if user uncheck A, corresponding value will be removed automatically. How can I do this?

  • Mavericks slow response for text fields

    Has anyone noticed that any text field is really really slow in response after upgrading to Mavericks?  I have a mid 2011 mac mini with 8 GB ram, 2.5 TB external disk drives.
    It is really driving me crazy having to wait to enter text in.  Most noticeble in Safari and iWorks.
    thanks
    Paul

    Hello Paul,
    Thank you for the details of the issue you are experiencing with text fields on your Mac after upgrading to Mavericks.  I recommend reviewing the steps in the following article for the issue you described (the title refers to the Mac in general, but the steps apply to the issue you described as wel):
    OS X Mavericks: If your Mac runs slowly
    http://support.apple.com/kb/PH13895
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Can't select CMYK text colour for text fields in Acrobat Pro forms?

    I have designed a business card template in Indesign, and now want to use Acrobat Pro to add in text fields so that a client can edit the contact details on the cards in future.
    I need to select a specific text colour for the fields, so that it matches the rest of the design. The cards will obviously need to be printed and the document has been set up in CMYK, but when I enter the CMYK colour breakdown in the Properties > Text Colour panel, it won't apply the colour to that field. The text either stays at the default black, or reverts to RGB - which isn't suitable for printing and doesn't match the colour I need.
    Can anybody PLEASE shed some light on this? Other similar posts have either not been answered or people have suggested JavaScript..? I have no idea what I'm supposed to do with a JS code..? Surely there's an easier explanation?
    Thanks in advance.

    This is for a text field that you create in Acrobat, whether the form is used offline or online. The script is a custom Format script, which you can place by bringing up the Properties dialog for the field, select the Format tab, set a format category of Custom, and you should see where you can enter the script. Change the string "Instructional text goes here" to the text you want to display when the field is blank.

Maybe you are looking for