Problem setting maximum characters for a date field.

Good morning all. I am trying to ensure that a date field on the form I am working on validates if the entry is not more than 8 digits, and if it is more, it should display a message, and return the focus back to the field until it is correct. Below is the code I wrote but it is not working:
  if(DATE1.length>"8"){
    xfa.host.messageBox(Enter eight digits for the date in the format YYYYMMDD or use the drop down calendar.);
xfa.host.setFocus("form1.Page1.DATE1");
I do not know why it is not working, i need help. I have this code on the exit event.
Thanks
v/r
Tammy

Well you are missing the " around the text in your messagebox but even then it doesn't seem to work. I am not a javascript expert so am not sure why but it works in formcalc like this:
if(Len($) > 8) then
    xfa.host.messageBox("Enter eight digits for the date in the format YYYYMMDD or use the drop down calendar.")
    xfa.host.setFocus("$")
endif

Similar Messages

  • Set maximum size in Text Form Field Options for a field in bi publisher RTF

    Hi All,
    How to set maximum size in Text Form Field Options for a field in bi publisher RTF.
    I have a RTF whch is having a field in that i need to add some validation condition but after adding certain condition in Add help text tab ,it is not accepting after certain length, how i can increase the length to unlimited,please help me on this
    Thnaks

    Form fields have some restrictions if your are using version lower than 11g.
    They can accommodate only 393 chars. You can add the text in both status bar and help key, which can in total consume 393 chars.
    If your code logic is more than that, it can be split into multiple form fields as Avinash suggested or you can use sub template logic and handle coding over there. Again in sub template code can be within/outside form fields.
    So there is no option for user to increase the size of form field.

  • How to set max size for a custom field ucm11g

    Hi,
    I need to set maximum length to a custom field created in ucm11g 11.1.1.6
    The field's data type is Text and for example i want to limit the length to 10 characters
    Any example how to do this ??
    Regards
    Carlos

    Hi ,
    If you are looking to limit the number of characters that can be entered to the field from GUI then a global side effect and rule combination will help you achieve it . It would be something like this :
    This is done by leveraging Side Effects under Rules - Rules Activation Conditions. You also need to set the Rule as Global for this to be effective across the system.
    In there the following has to be set:
    <$dDocTitle:maxLength=80$>
    <$dDocName:maxLength =50$>
    Set the above side effect in the rules and corresponding Profile need to refer it for being able to limit the number of characters that can be entered for Title and Content ID.
    Custom metadata too can be controlled in the same way . For example, if metadata "Version" need to limit the number of characters being entered then "Side Effects" to be set is as follows :
    <$xVersion:maxLength=50$>
    NB - the maxLength parameter is not supported for fields of type Memo. It will only take effect on standard text fields.
    Thanks,
    Srinath

  • Creating process for multiple Date fields for update or insert in APEX

    hello there,
    could someone please help me?
    i have a form on Apex based on view that is based on three tables and updating and inserting ok using trigger instead of.
    i have a problem now as in my form i have around 75 fileds (items) incuding 30 or more date fields which could be populated or left blank or update later.
    so for each date field i have two boxs; one for date, input as dd/mm/yyyy (text field) and second for time, input as 23:45. All dates will be insert or update manually by user. so as i mentioned not all date fields could be poulated at one stage.
    so i have created some process and validations and all of them work fine but i came accross if date left blank then (:) giving me problem so i have done following further process for each date field. In real table all the date fields have data type date.
    declare
    v_my_var date; -- for first date field
    str_dy VARCHAR2(10);
    dt_indx date;
    str_tm VARCHAR2(20);
    tm_indx date;
    begin
    str_dy := :p4_first_date
    str_tm := str_dy||' '||substr(:p8_first_date_hh,1,2)||':'||substr(:p8_first_date_HH,4,2);
    dt_indx := to_date(str_tm,'DD/MM/YYYY HH24:MI');
    IF str_dy is not null then
    v_my_var :=dt_indx;
    ELSE
    v_my_var := NULL;
    END IF;
    update table 1 set my_date = v_my_var where d_id= :p4_d_id;
    end;
    above code work fine but one date field of course therefore i have to do same code for each date field with changes and initialise variable again and again for each field.
    so i like to ask is there any easy way that is more professional. i was thinking about the procedure and using collection or similar but honestly not much experience on that so could some one please help me?
    I will be very thankful.
    KRgds

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

  • Error when saving a default format for a date field in 11g

    Getting this error when attempting to save the default for a date field in 11g:
    The current xml is invalid with the following errors: Bad xml instance! <?xml version="1.0"?> <sawsavedformat:metadata xmlns:sawsavedformat="com.siebel.analytics.web/savedformat/v1.1"><sawsavedformat:columnSavedFormats><sawsavedformat:columnSavedFormat xmlns:saw="com.siebel.analytics.web/report/v1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="sawsavedformat:regularColumnSavedFormat" columnName="&quot;Retrospectives&quot;.&quot;Time Dim&quot;.&quot;Two Months Ago&quot;"><saw:displayFormat><saw:formatSpec suppress="suppress" wrapText="true" visibility="visible" hAlign="left" vAlign="top"><saw:dataFormat xsi:type="saw:custom" customFormat="MMMM dd, yyyy" displayTimeZone=""/></saw:formatSpec></saw:displayFormat><saw:tableHeading><saw:displayFormat><saw:formatSpec/></saw:displayFormat></saw:tableHeading><saw:columnHeading><saw:displayFormat><saw:formatSpec/></saw:displayFormat></saw:columnHeading></sawsavedformat:columnSavedFormat></sawsavedformat:columnSavedFormats></sawsavedformat:metadata>
    Line:2, Col:608, Attribute 'displayTimeZone' is not declared for element 'dataFormat'
    Thoughts and suggestions?

    I have a Support Request open with Oracle right now (it's taking a few weeks to resolve) but here's the update:
    OBIEE 10g handles DATE types differently than 11g. Both the support rep and I can't figure out how, but they are different. If you bring the column in as a DATETIME in your Physical Layer you can't save it system-wide, even if you do set a time zone for your account (My Account -> Preferences -> Time Zone). If you bring the column in as DATE you can save it system-wide but you can't display the hours/mins/secs, only the M/D/Y. This has been tested on a 9i and 10g database and produced the same thing on both. The problem never occurred with those same columns using OBIEE 10g.
    Oracle support has not fully admitted this as a bug, but the rep working on this SR said this will probably be fixed in the next release- 11.1.1.4, which is due out late Jan/early Feb of this year. He is trying to reproduce this so he can log it as a bug (which we all are hoping for!) so Oracle can address it.
    For now, I've found that you are stuck with two options: 1) bring the column in as a DATE, display it system-wide as a saved format, but you can't show the time, and 2) don't save that date value with a system-wide formatting and set it manually on every report you need a custom format (don't forget to set your time zone).
    If I hear anything more back from Oracle support I'll update this thread.
    Sorry guys, looks like we're all stranded on this one...

  • Javascript for multiple date fields

    Hi all-
    I have to write javascript for 15 different date fields in a form.
    The requirement here is that we convert all date fields on Page 100 from date pickers (editable date fields) to display-only date fields with two controls for the users to set the date.
    If the field is empty (no date registered yet), there will be a green checkmark(X). When the user clicks this checkmark, the current date is entered into the field.
    If the field is not empty (there is a date already in the system), there will be a red X. When the user click this red X, the date from the date field is removed.
    The javascript I am using here is
    </script>
    <script type="text/javascript">
         function init(){
              var datePickerVal = $v2('P100_TODAYS_DATE');
              if(datePickerVal){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
              }else{
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
         function toggleDateFunc(pValue){
              var sysDate = $v2('P100_DATE');
              if(pValue == 'R'){
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE','');
              }else if(pValue == 'G'){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE',sysDate);
         window.onload = init;
    </script>
    This javascript is working for one date field( 'P100_TODAYS_DATE') but i have 15 different date fields in this page(100) all should have same funtionality. Please help me out how to write a logic to use this function for all the date fields.
    Thanks,(apex 3.2)
    Greenhorn
    Edited by: Greenhorn on Jul 19, 2011 12:30 PM

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

  • How to restrict number of characters for an input field

    Hi All,
    I have an input field.
    The max number of characters for this input field is 10.
    when a user enter more then 10 characters. it should prompt for an error or the input field should not allow to accpet the 11 character.
    how we do this in VC.
    need your helpful answers
    Rgds
    Srinivas

    Hi Srinu
    You could achieve this by configuring error messages under the formula:-
    Select the control properties and in the Input field at the Display tab write the formula
    "IF((@<LEN(text)>10),'appropriate message','Records available')"
    Note :- there is a LEN(text) under text functions in formula tab.
    Regards
    Navneet
    Message was edited by:
            Navneet Giria

  • After upgrade from 4.6c to ECC6.0 F4 Help is not coming for few date fields

    Hi Friends
    Just now we have completed upgrade project from 4.6c to ECC6.0.
    After upgrade F4 help is not working for some date fields.
    For example its working in MB11,Its not working in va01,vf01 like that.
    In abap side we checked ...not able to find any issues in coding level, because its a standard SAP code.
    So if any solution is there to correct this issue.Kindly help me to resolve this asap.
    Thanks
    Gowrishankar
    Edited by: gowrishankar p on Nov 17, 2009 7:25 AM

    Hi
        Please refer to the SAP note 1278056 and 1278115 - PDS Display: F4-characteristic values are not selectable.  Hope this will resolve your issue.
    Regards,
    JB

  • Re: Problem providing download link for BLOB data in apex report

    Hi Don,
    Your solution below worked but in the download option i only see save but not open for PDf file in the blob. Please let me know if you have any suggestion to achieve it
    Thanks
    Jo
    Problem providing download link for BLOB data in apex report 
    591953 Nov 19, 2008 1:55 PM (in response to 660436)
    Currently Being Moderated
    Good morning,
    Here is how I have solved this problem.
    1. The select statement in the sql for the report should not include the BLOB column. I decided to select only 2 columns, the column that has the key and the column with the filename.
    2. On the first column ( the primary key ) I put in the format statement that was simply DOWNLOAD:TABLENAME:BLOB_COLUMN:PRIMARY_KEY
    This works. I believe that the Oracle error I was getting was because I was trying to apply this format statement to the actual BLOB column.
    So, it appears that you can use any of the columns in the report to hold the DOWNLOAD format statement since in the format statement, you are defining the BLOB table, BLOB column and the primary key into that column.
    Hope this helps,
    Don.

    Branched out from a years old thread.
    user3003326 Don't post to old threads, please.

  • Is there any way we can set default value for a Date Attribute to current date in Master Data Services

    Is there any way we can set default value for a Date Attribute to current date in Master Data Services.
    I as well wants to know that is there any posibility to show Calendar control while input data into respective date attributes.
    Thanks.

    Hi Anagha,
    So far i havent found any way to set todays date by default from MMI, but i guess this flow should work as workaroud
    1. Add buisness rule which can set a default value when Date = NULL/Blank
    2.get the entity table ,use -select EntityTable from mdm.tblEntity where Name = '<enter entity name>'
    3.Go to that table and add a after update trigger like
    if uda_<entityid>_<attributeid(Date attribute)> = default value
    update uda_<entityid>_<attributeid(Date attribute)> =getdate() where id = <LastUpdatedRow>
    I will check on this too from my side.
    By the way AFAIK i dont think so calendar control integration is possible .

  • F4 help for PO date field in VA01 transaction during upgrade

    Hi All,
    We are working on upgrade project 4.6c to ECC 6.
    We came across one scenario.
    F4 help for PO date field is not coming in newer version in VA01 transaction but i checked in older version it is coming F4 help for PO date(calender).
    May i know the reason regarding this.
    Any clues
    Regards
    Jai
    Edited by: Jayanth16 on Nov 12, 2009 6:14 PM
    Edited by: Jayanth16 on Nov 12, 2009 6:22 PM

    Hi,
    User did some changes in include LSDSDF05 due to that F4 help is not coming.
    So i correct that one.
    Regards
    Jai

  • Transport request for Set Control Parameters for Actual Data.

    Hi Viewers,
    I am unable to create the transport request for the below settings
    Controlling->Profit Center Accounting->Basic Settings->Controlling Area Settings->Activate Direct Postings->Set Control Parameters for Actual Data.
    Is it possible to move the request through transport request or do we need to create the settings directly in the target system.
    Thanks
    Aswin.

    Hi,
    Please read the IMG help at the given path.  There are certain profit center accounting settings which cannot be transported directly from the same path, but there is another node in SPRO path for doing this.  If possible I will try to locate the path but I am not sure I can post it immediately as I am not having system handy.
    thanks,
    Kumar

  • Average value for a Date Field in an OO Alv Grid.

    Hi Abapers.
    I've been searching for some info about averages in OO Alv grid lists but cannot find an answer to what I'm really need. The question is that, for getting an average, a 'C' value must be set in the field DO_SUM of the fieldcatalog structure for a field.
    Now, the problem is that I need the average of a date field (in 'normal' date format). I've tried it several times and read a lot of things but cannot find a real answer: Could it be done the average of a date field (e.g. for dates 01.05.2009, 02.05.2009 and 03.05.2009 the average is 02.05.2009).
    Best Regards.

    Hi,
    It will come along with the standard tool bar.For number fields, you can see it(Mean).

  • Problem Querying Oracle Forms Using a Date Field and a Format Mask

    Hello,
    We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
    We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
    We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
    - The Oracle Database version we are running is Release 10.1.0.5.0.
    - The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
    Thanks,
    Kris

    There is no obvious reason that I can see.
    Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem.

  • Set Maximum size for a subpanel created with splitter bars in LV8

    Does anyone know how to set the Maximum size for a subpanel created with asplitter bar? If I show one cluster in the subpanel and use the scroll bar to scroll, I can see more (blank) area than I want. I just want the user to be able to scroll a cluster within a subpanel while the cluster is larger than the view area of the subpanel. I don't want to let the user scroll outside the cluster.
    Ravi Beniwal

    I apologize for the mixup in terminology. Please read Pane wherever the word Subpanel was used.
    Please see the attached VI for a description of my problem.
    I would really appreciate any help with this.
    Ravi Beniwal
    Attachments:
    Pane Scrolling Problem.vi ‏10 KB

Maybe you are looking for

  • How do i edit a PDF file that was sent to me in an email?

    How do i edit a PDF file that was sent to me in an email?

  • Redelivery limit not working for transaction timeout?

    hi,           we have a redelivery limit on a queue that works, except for when there is a transaction timeout. in this case, the message seems to be redelivered infinitely. Is this a bug? a feature?           we are using Weblogic Server 8.1 SP4. we

  • A new partner function is been defined for a particular customer in r/3?

    Hi All, There is a new partner functions been defined for a customer apart from soldto,shipto,payer,billtoparty partner functions. The new partner functions is Sales head. And how to i bring the sales head information from the customer master from r/

  • Airplay from 4S crashes Wifi

    When I use the iPhone4S Airplay function in my home network, it will play music for about 30secs, then the Wifi will cut out - for all devices - the indicator light on my Airport Extreme blinks yellow until it - so I assume - reboots and all is fine.

  • How to handle exception in driver program

    Dear Friends;      I have been assigned to  object wherein i have to display a form for which i am gathering all my data in smartform and my requirement is that when first time data selection failed i.e. no data found against selected order number (A