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

Similar Messages

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • How Can i send the data entered in Input text fields to e-mail?

    Iam Jennifer, Iam having a doubt in Flash, I hope that you
    are going to solve my problem, Iam taking 3 Static text fields as
    Name, Age and Country and besides each and every static text fields
    i have taken 3 input text fields with different instance names,
    when i enter my Name, Age and Country details in the input text
    fields and after entering those details if user clicks the submit
    button the data should be send to some mail address, is it possible
    Im not so good at action script, but i hope that any one can
    help me...
    Iam attaching the action script code also, please find the
    attachment below, the actions are given to button.
    Attach Code
    Btn.onPress = function ()
    mail_lv = new LoadVars();
    mail_lv.dummy1 = "";
    mail_lv.subject = "Details";
    mail_lv.message = "hi";
    mail_lv.username = "name_txt".text;
    mail_lv.age = "age_txt".text;
    mail_lv.country = "country_txt".text;
    mail_lv.onLoad = function ()
    trace("Sent successfully...");
    trace("mail_lv.subject = " + mail_lv.subject);
    trace("mail_lv.message = " + mail_lv.message);
    mail_lv.send("mailto:[email protected]", "_blank");

    The names of your variables, "name_txt", for instance, should
    NOT have quotes around them. Use:
    mail_lv.username = name_txt.text;
    mail_lv.age = age_txt.text;
    mail_lv.country = country_txt.text;

  • Combining Date and Time into 1 Field

    Post Author: Marc Vaccarino
    CA Forum: Formula
    Hi,
    I'm trying to write a formula to combine 2 fields (date and time) into one. I would like it to look like this.
    2/12/2007 + 12:00pm = 2/12/2007 12:00pm
    Thanks,

    Post Author: Marc Vaccarino
    CA Forum: Formula
    Thanks that worked but my problem is currently the date field I'm using has a date and time (12/12/2007 12:00am) and the time field has it as well  (12/12/2007 1:45am).  I've been going into crystal and clicked on format field and just showing the date and in the time field, just showing time. Then I would extract the report to excel then run another formula to get it to work. I'm looking to automate it a little. Any ideas??

  • 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

  • Validating a text field that has date in the format mm/dd/yyyy

    How can I validate a text field such that it should be in the format mm/dd/yyyy and it should not be greater that a particular date.
    for example the date I enter should not be greater than 01/01/2007

    What you can do is use the SimpleDateFormat class to try and parse the text date into a Date object like this:
    SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
    Date mydate = sdf.parse(textdate);if that fails than the date has the wrong format (you'll get a ParseException if I'm not mistaken).
    The next step is to create a Date for 1/1/2007 and then do a date compare between your two dates. You can create a date yourself using the Calendar class.

  • Extract Year (only) from Date Field and Display in Text Field

    I need to extract the year from a user entered date field and display the year in a text field. Can someone help me with the correct script to do this?

    Hi,
    that's quite easy to realize with FormCalc.
    In you date fields exit event add the following code:
    textField1 = Num2Date( Date2Num($.formattedValue, "MM/DD/YYYY"), "YYYY")
    Note: This sample assumes that your date field formats the date with "MM/DD/YYYY". You may have to change the pattern to make it work at your end.

  • Query a view w/data entered into a text field populated by 2 table fields

    Hello, Looking for advise!!! I have a tabular canvas thats datablock uses a view to populate. In this canvas I have a text field that has been populated with first_name || ' ' || last_name in the database node of the property pallate column name. The text field is not in the table or view. I have created it in the data block and make it a database item. However, I would like to have the user push a search button to go into ENTER_QUERY mode then the user would enter the criteria to search on in this text field. The user would then push button to EXECUTE_QUERY. The result is I retrieve all records. I want any search criteria entered into this field to be used against the last_name field to retrieve any records equal to the search criteria entered, for example A%. Does anyone know if this is possible?

    Hi!
    You have to use PRE-QUERY trigger to compose the search criteria. Below I put an example of it. You have to have at least one item in the block wich is true database item (e.g. it has to exist in table or view on which your block is based). In the following example EMP_DESC is your non-database search item and EMP_ID is the database one.
    Declare
    Dummy VARCHAR2 (2000);
    begin
    if :EMP.EMP_DESC IS NOT NULL and :EMP.EMP_ID IS NULL
    then
    Dummy := '#IN (SELECT emp_id FROM Employees WHERE Upper (emp_first_name)||'' ''||Upper (emp_sec_name) LIKE Upper (''%'||:EMP.EMP_DESC||'%''))';
    Copy (Dummy, 'EMP.EMP_ID');
    end if;
    end;
    Thats it. Note the # sign in the first position of the Dummy assignment. This is required by forms to glue your search criteria and block's where clause. You may analize LAST_QUERY property of your block in order to understand how this work. Remember also to set the QUERY_LENGTH property of the EMP_DESC item to the value that could contain the whole Dummy string (otherwise it will give you an error and cut the mar the query).
    Hope this helps.
    Sergey.
    P.S. And set your EMP_DESC database item property to NO.

  • V V V V Urgent; User asked for F-02 and F-43 Text FIeld mondatory.

    Dear SAP Gurus
    Please Suggest me how should i make Test field as mondatory field in F-02 and F-43 T codes, As i searched in the Internet saying go for Validation i have tried it but no Output. Now just i would to ask you whetheri should go for Ob41 PK FSG or OBC4 FSG If i go for PK FSG will it be effectd in some other Transaction.
    If i go with Validation please share me exact Preriquisite and check with symbols plzzzzzzzzzzzzzzzzzzzzzzz
    Please this is very urgent Requirement.
    Help me out
    Advance Many thanks to Gurus
    Moderator: Please, read and respect SDN rules. That is 3rd warning. Upon next violation your user will be banned

    Hi,
    If you want Text field mandatory in specific T-code then go for Screen Painter and make it mandatory for this take the help of ABAP consultant if you dont know how to do.
    You can do this from validation also.
    Regards,
    Shayam

  • Looking for a tool to search text fields in about 1000 reports installed on Business Objects Xi R3

    Hi,
    i am looking for a tool, program that can search all our reports installed on Business Objects Xi R3 for specific content in text fields and formulas.
    We used a couple of years ago .rpt inspector, that worked pretty well for our purpose.
    Unfortunately  this is Win XP & Win Server 2003 only, so we can't reuse it anymore.
    (I know there are way of getting WinXP that in a VMware, but that is not an option in our company.)
    So i am interested , if there is another tool out there, which can help us?
    regards Alex
    btw we are using Business Objects XI R3 (SP7) with reports deisgned on crystal reports designer 2008

    Hi,
    i am looking for a tool, program that can search all our reports installed on Business Objects Xi R3 for specific content in text fields and formulas.
    We used a couple of years ago .rpt inspector, that worked pretty well for our purpose.
    Unfortunately  this is Win XP & Win Server 2003 only, so we can't reuse it anymore.
    (I know there are way of getting WinXP that in a VMware, but that is not an option in our company.)
    So i am interested , if there is another tool out there, which can help us?
    regards Alex
    btw we are using Business Objects XI R3 (SP7) with reports deisgned on crystal reports designer 2008

  • Competitor - Strategy and counter strategy text fields in Web UI

    Hi,
    I want to bring  strategy & counter strategy  text fields in the competitor screen of opportunity.
    Component: BT130I_OPPT
    View: BT130I_OPPT/CompetitorProdEF
    .The other standard fields strength and weakness are already visible in WEbUI.
    Also the text fieds strategy & counter strategy  are visible in SAP GUI -opportunity - Competitor tab
    In standard to display strength and weakness the view /CompetitorProdEF has 2 context nodes BTText1  (Relation BTTextIFirstchangable) and BTtext2 (Relation BTTextISecondchangable).
    I tried to add new contect node for strategy & counter strategy (Relation BTTextIAll)  but the save is not working properly.
    Kindly suggest what needs to be done to make these standard text
    types available in this view in WebUI
    Thanks & Regards,
    Sanila

    Hi,
    The issue is related to 'window.open("url")'. I replaced the above function with another script window.navigation("url).
    When 'window.navigation' script is executed, browser is asking a security question whether to download the content or not. If i click yes, whole window is refreshed and existing data is gone. This happens only for first time when we try to download. After this the download is working fine without any session time out, if we are using the same window.
    Kindly help if you have any inputs regarding the issue.
    Thanks a lot.
    Regards,
    Arun N K.

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

  • Data Manipulation on a Text Field

    I have an HTML form in which I enter information about a data provider. The first field in this form is composed of three pieces of data, separated by underscores. Is it possible for me to extract each of these individual pieces, and use them to populate other fields in the same form? If so, after this is done, I would like the user to be able to continue populating the rest of the fields in the form.
    Thank you in advance,
    M.S.

    Look at implementing a procedure using "instr" or "substr" functions.
    Gus

  • What happened to the date and time of text messages, on my Iphone 4.  This stopped about four days ago.

    As of four days ago, the date and time of my text messages does not appear.  I don' t know what hapened.  I have reset the network settings, but it didn't fix the problem.

    Hello andyb4u8,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    http://www.apple.com/support/iphone/assistant/calls/
    Best of luck,
    Mario

  • How to determine the data type of  a text field

    hi,
    I have a text field, now i need to know what data type i have given?
    it may be numerical, string, date & boolean data type. when i write something after that it will determine the data type of the input text? is it possible in jsp? Is there anyone who can help me about this? Please help me
    With regards
    Bina

    javascript:
    function test(sample){
          if(sample==true || sample==false){
           alert('boolean')
          }else if(isNaN(sample)){
           alert('number')
          }else{
          alert('string')
        }

Maybe you are looking for