Date field automatcailly changing when tabbing through other scripted fields

I have a form with a datetime field. The object is readonly. I format the field with javascript as yyyymmddhhmmss as a tracking number for the form. When tabbing through other fields with javascript the value changes to the current date time, like the code is being executed each time a scripted field is entered.
Any ideas how to prevent that? I just want the code to execute when the form is opened.
----- form1.sbfDirect_Pay.dteCurrentDate::ready:layout - (JavaScript, client) ----------------------
// Current Date in short-style date format.
// $.rawValue = num2date(date(), DateFmt(1, "))
var varCurrentTime = new Date();
var varYear = varCurrentTime.getFullYear();
var varMonth = varCurrentTime.getMonth() + 1;
var varDay = varCurrentTime.getDate();
var varHour = varCurrentTime.getHours();
var varMin = varCurrentTime.getMinutes();
var varSec = varCurrentTime.getSeconds();
if(varMonth<10) varMonth = "0" + varMonth;
if(varDay<10) varDay = "0" + varDay;
if(varHour<10) varHour = "0" + varHour;
if(varMin<10) varMin = "0" + varMin;
if(varSec<10) varSec = "0" + varSec;
// $.rawValue = year + "" + month + "" + day + "" + hour + "" + min + "" + sec;
dteCurrentDate.rawValue = varYear + "" + varMonth + "" + varDay + "" + varHour + "" + varMin + "" + varSec;

I think I just answered my own question. The code was in the layout:ready event. This area is executed each time the layout is modified. I moved the code to form:ready event.

Similar Messages

  • Why does the Date Created metadata change when images are exported?How do I stop it from changing?

    why does the Date Created metadata change when images are exported?  How do I stop it from changing? I must have a prefernce set up wrong.

    I don't know what OS you are using, or what application you are using to view the data about your exported files, but on Windows and using Windows Explorer the "Date Created" field relates only to the date that the exported file was created, i.e. if viewed immediately after export it will show the date created as being the same date. In order to view "Capture Date" in something like Explorer, you first have to ensure you have included the Metadata as Conrad outlined above, then you have to adjust the display properties of Explorer to show the "Date Taken" field. Here is an example, part of a folder I exported back on March 3rd, note the difference between that last two dates:

  • PDF form text fields' options change when opened in READER on a MAC.

    I created a PDF form using Adobe X PRO. All fields are UNCHECKED for Property/Options/ "scroll long text". I save and distribute the form as a "reader extended pdf/enable additional features" so it can be saved and returned using READER.
    When a Mac user opens the extended form in Adobe READER, ALL the text fields change to scroll. When he returns the completed form to me, every text field, even signature and date fields, are changed to scroll text.
    What is happening in the transition from PC to MAC?

    Preview is the default PDF viewer on the Mac. It should never be used with PDF forms. Just let them know that they should use Adobe Reader. Provide a link or URL where it can be downloaded and let them know that it's free.
    There are things you can do so that it doesn't work in Preview, but it involves some scripting. If interested in this approach, post again.

  • Billing doc creation date in order changing when cancelled

    Hi All,
    In Order, if 'Future Cancelled date' is given, Billing document creation date is being changed automatically to cancellation date (if cancellation date is less than billing date). Is there any way to restrict this?
    Thanks,
    Regards,
    Rajesh.

    Hi Leo,
    When any invoice is cancelled it will automatically pick the original invoice date.
    If you want other date on which the cancelled invoice has to be created can give the date in the billing date field, so that it wil creat cancelled invoice on date you entered when cancelling
    T.code VF11.
    kindly reward points if usefull.
    Regards
    RVK

  • How do I keep the original creation date showing? The date seems to change when I edit.

    I don't know if there is a setting somewhere to maintain the original creation date when a document is edited. What is happening is that when I edit a document, even if it was created months ago, the creation date is often changed (though strangely not always). I know most settings are document specific, so perhaps I have unwittingly unchecked a setting on the ones that changed. I should note that previous version are being maintained through my back up and do show up in the list when I select Revert to from the File menu. But the creation date shows the date of the most recent edit on those files.
    I use a MacBook Pro and an iPad to create and edit documents and am using the most recent version on both.
    Thanks, in advance.
    Shel

    "actual original creation date must have been changed. I don't believe there is anything to fix it"
    You can change the creation date using Terminal application:
    touch -t YYYYmmDDhhSS /path/to/file
    IE:
    touch -t 200001010101 ~/Untitled\ 2013-10-11\ at\ 8.15.04\ PM.png
    This produces (from the screenshot I just took):
    To change the modification date only, it would be touch -mt ....etc
    As to why this is occuring, what is the creation date showing....//1969?

  • Make PO Box City field as required when either of other fields r non-blank

    Hi,
    I need your help and valuable suggestion to fix this problem.
    While Creating/Changing a vendor, I would like to input some data in the PO box address area (Table LFA1). If I populate the fields PO Box & Postal code fields in this area, the PO box City field should become a required one. Currently it is an optional field. I dont want to do it at field status level.
    If there are not any data in either of those fields, then PO box city field should be an optional one.
    How can we do this? Please provide me a solution in detail.

    hi,
    You can use user exits for this req. Take the help of your ABAPer who can assist you in finding the relevant exit and fix this as per the logic specified by you. Or you can also approach SAP Service marketplace who will provide the required data.
    hope this helps
    regards,
    radhika

  • Event Structure's value change, not detecting changes when tabbing thru array of clusters

    Hi!  I have an array of clusters (int, int, string, int) control, and want to detecting changes made to the it.  I used the Event Structure's value change case on the array, it works excellent except that it'll only detect the changes when you click out of the element or press the enter key (the one by the numbers, not carriage return).  I want it to detect the changes when I tab thru the cluster or array too, but I can't figure it out... Does anyone have any ideas?
    Thanks!

    mfitzsimons wrote:
    altenbach
    Tried Value Change with my example done in 7.1 and it doesn't trgger an event.  That is why I suggested Mouse Down.
    Curious. I did a few minor edits in 8.0 before saving as 7.1, but the simple value change event got triggered just fine when the value vas terminated with a tab in 7.1. Every time.  Strange....
    Are you on 7.1 or 7.1.1? Maybe there's a difference (I am using 7.1.1).
    LabVIEW Champion . Do more with less code and in less time .

  • Best way to mark data that has changed when it is edited in  a spark datagrid?

    I am not sure if this is the best way to mark data that has changed (isModifiedClientSide ) when it is edited in  a spark datagrid:
    <GridColumn  width="140" headerText="Margin "dataField="margin" editable="false"  editable.editMode="true"  >
                        <itemRenderer>
                            <fx:Component>
                                <DefaultGridItemRenderer textAlign="right"   background="true" backgroundColor="#ffffff"  alpha="1.0" color="#000000" >
                                    <focusOut>
                                        <![CDATA[
                                        this.data.isModifiedClientSide = 1;
                                        ]]>
                                    </focusOut>
                                </DefaultGridItemRenderer>
                            </fx:Component>
                        </itemRenderer>
                    </GridColumn>

    I tried this but the value commit doesnt't get fired bro:
        <GridColumn  width="140" headerText="Margin (disabled)" headerText.editMode="Margin (editing)" dataField="margin" editable="false"  editable.editMode="true"  >
                        <itemEditor>
                            <fx:Component>
                                <DefaultGridItemEditor>
                                    <valueCommit>
                                        <![CDATA[
                                        this.data.isModifiedClientSide = 1;
                                        ]]>
                                    </valueCommit>
                                </DefaultGridItemEditor>
                            </fx:Component>
                        </itemEditor>
                    </GridColumn>
    what do you think?

  • Dates get randomly changed when importing folders into Aperture

    I am in the process of migrating my iPhoto pictures over to Aperture. Because I have close to 100k pictures and short clips, I can not import my entire 500 GB library at once because I don't have enough hard drive space to support both iPhoto and Aperture libraries at the same time. I also thought it might make sense to not have one gigantic library. Also I would like to have my old photos separated by years, and I don't know if Aperture would do this if I imported the entire iPhoto library (which does only separate them by events) at once. So it appears to me that the only import method that would work (please correct me if this is wrong) would be to open the "Masters" directory of iPhoto in the Finder, and drag and drop each year's directory into the "Projects/Library" panel in Aperture. Note that I do not want any editing information preserved from iPhoto, so using the Masters seems to be the most space efficient thing. So far so good but there appear to be at least two big snags. Firstly the yellow projects folders within each blue years folder in Aperture are not in chronological but in alphabetical order and I can't find out how to fix this. Secondly (and much more problematically) the dates on many old photos have been altered in an apparent random manner during the import into Aperture! Therefore they do appear in the wrong locations in my events library, according to the altered date. There are many too many photos that have been changed to undo this manually (I estimate it would take several weeks to do this).
    But how and why could this have happened in the first place?
    I also noticed that even when I change the dates of the Aperture masters to the true ones (by comparing to the masters in iPhoto), they still remain in the same wrong location in my Projects/Events library, according to the date originally (and falsely) assigned by Aperture.
    There surely has to be a way to import photos into Aperture without ruining their date stamp?
    Thanks in advance for your help!

    Hi iScientist,
    If I understand you correctly I should not import iPhoto Masters directly, because they have been altered to be in some kind of internal organization scheme. What I'm confused about is that I thought the "Masters" in iPhoto were just untouched camera files?
    Yes, I would also be confused. The more I think about it, the less I know why anything wrong. You stated that you don't care about any adjustments you made in Aperture, so why wouldn't be okay to "reach into" iPhoto's internal database and pull out the masters? Good question. The only thing I can come up with: Maybe that folder isn't really what you think it is.
    Were you able look at the metadata in Preview after finding one of the problematic masters in the iPhoto library again? That might give a clue.
    When you say "regular way", do you mean going to "Import -> iPhoto library"? The problem with this, it seems, is that my entire iPhoto library will be imported that way, however I would like to import it chunks, split in years and on different physical media
    Yes, that is what I meant. There have been various topics in this forum concerning how to import parts of the iPhoto library. I cannot seem to find any relevant posts at the moment. Perhaps someone else has better luck searching...
    In any case, you may be better off using *referenced masters* instead of multiple libraries. With multiple libraries, your photos will be disjointed by whatever scheme you devise (like years). So, when you're looking at 2011, and you want that Christmas photo from 2010, you will need to close Aperture and restart it with a new library.
    With referenced masters, you choose to store a particular set of *masters only* (maybe all of them) in another location. You can put different sets of masters in different places. For instance, you can have one project on one external hard drive, and a different project on a different external drive. Your versions, metadata, previews, thumbnails, all stay in the library. In this way, you can at least view screen-sized versions of last Christmas even if your "2010" external hard drive is not connected.
    Looking at manual for references to referenced may be good for you before you delve too deep into this.
    What I meant by order being unchanged/the file being in the wrong location is that in the chronologically organized projects overview the projects that were imported with the wrong date, which I changed to the correct date in Metadata, still appear in the wrong location.
    Ahh, that is a bug that users discovered a little while ago. It took me a while to re-find the thread, but you can read up on that here. I (among others hopefully) have provided feedback to Apple concerning that bug.
    [http://discussions.apple.com/thread.jspa?messageID=12981789&#12981789]
    I didn't think about that view because that view is not generally as useful as the list view in the Inspector pane. That view is new to Aperture 3 and in my opinion was built to make the transition for users of iPhoto easier.
    nathan

  • Create a DNG file that does not show changes when viewed by others

    I am adjusting my RAW Images in Adobe Lightroom and want to export them as DNG without betraying the evidence of my post production efforts- is there a way to save an altered file as a DNG without showing the client which changes I have made when they open and review the files in CS3 (bridge/camera raw)?

    > is there a way to save an altered file as a DNG without showing the client which changes I have made when they open and review the files in CS3 (bridge/camera raw)?
    The raw data itself is not affected by the adjustments, only the metadata. This means, that the adjustments you made are recorded in the DNG file in XMP format, which is quite clear-text, like
    > +1.0
       25
       0
       False
       Custom
         0, 0
         22, 30
         51, 68
         128, 128
         206, 149
         255, 255
    As this can be seen by anyone, who knows where and what for to look, you need to have ACR record the adjustments in XMP sidecar files (which is a better way anyway, you can archive the original file and the adjustments separate).

  • Date on photo changes when transferring file

    Hello
    I have photos in my iphoto library and when I transfer the photo to my desktop it changes the date to some random date. It does not do this with all photos, just some of them. I shoot RAW if this makes a difference and the date on my computer is correctly set.
    Thanks

    Hello
    I have photos in my iphoto library and when I
    transfer the photo to my desktop it changes the date
    to some random date. It does not do this with all
    photos, just some of them. I shoot RAW if this makes
    a difference and the date on my computer is correctly
    set.
    Thanks
    Hey there...
    When you import your photos, the iphoto library keeps the actual date of the photo taken. When you import movie files, the date when you import it is kept, not the actual movie recorded date.
    I've not handled RAW files, so I have no idea whatsoever.
    Hope this helps. If it doesn't, sorry!
    iMac G5   Mac OS X (10.4.2)  

  • Add billing date in existing prog when goes through VF01

    How do I add the billing date as sy-datum in my program that uses BDC to create billing documenst for the sales order in the output . I would like this to take te billing date as sy-datum. I know if if I add the billing date as todays date while generating biling documenst for multiple selections of sales order it will process and create a billing doc for it, right now which si not happening as billing date is missing. I want to add the billing date in BDC. Could I get some help please. In the below case only for p_rdos.
    *&      Form  process_vf01
    *       Call transaction VF01 and fill screen table with order values
    FORM process_vf01.
      DATA: ln_index(2) TYPE n,
            lc_field(20) TYPE c,
            lc_fkart TYPE vbrk-fkart,
            li_lines TYPE i,
            lc_msgtxt(99) TYPE c,
            lwa_bdcoptions TYPE ctu_params,
            lwa_mess LIKE LINE OF it_bdcmess,
    *        lc_date like vbrk-fkdat.
            lc_date like sy-datum.
      REFRESH: it_bdcmess.
      lwa_bdcoptions-dismode = cns_mode.
      lwa_bdcoptions-updmode = cns_upd.
      CASE 'X'.
        WHEN p_rdff.
          lc_fkart = cns_fkff.
        WHEN p_rdos.
          lc_fkart = cns_fkos.
          lc_date = sy-datum.
      ENDCASE.
      DESCRIBE TABLE it_vbeln LINES li_lines.
      REFRESH: bdc_tab.
      PERFORM update_bdc USING: 'X' 'SAPMV60A'    '0102',
                                ' ' 'BDC_CURSOR'  'RV60A-FKART',
                                ' ' 'RV60A-FKART' lc_fkart,
                                ' ' 'BDC_OKCODE' '/00'.
      LOOP AT it_vbeln INTO wa_vbeln.
        ln_index = sy-tabix.
    *   Up to the second delivery of the BDC add the Delivery to the screen,
    *   after that click the More Documents for every entry.  logic changed for DEVK902353
    *   changed again in added for every line DEVK910604
        CASE ln_index.
          WHEN 1.
            CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
            IF li_lines = 1.
              PERFORM update_bdc USING: ' ' lc_field wa_vbeln.
            ELSE.
              PERFORM update_bdc USING: ' ' lc_field wa_vbeln,
                                        ' ' 'BDC_OKCODE' 'FKAN'.
                  ENDIF.
          WHEN OTHERS.
    *        IF p_rdos  <> 'X'.
            CONCATENATE 'KOMFK-VBELN' '(2)' INTO lc_field.
            PERFORM update_bdc USING: ' ' lc_field wa_vbeln,
                                      'X' 'SAPMV60A'   '0102',
                                      ' ' 'BDC_OKCODE' 'FKAN'.
        ENDCASE.
      ENDLOOP.
    * VF01 will go to a different screen if only one line selected
      IF li_lines EQ 1.
        PERFORM update_bdc USING: 'X' 'SAPMV60A' '0104',
                                  ' ' 'BDC_OKCODE' '=SICH'.
      ELSE.
        PERFORM update_bdc USING: 'X' 'SAPMV60A' '0102',
                                  ' ' 'BDC_OKCODE' '=SICH'.
      ENDIF.
      CALL TRANSACTION 'VF01'  USING bdc_tab OPTIONS FROM lwa_bdcoptions
                              MESSAGES INTO it_bdcmess.
      WRITE: / 'BDC Messages:'.
      SKIP.
      LOOP AT it_bdcmess INTO lwa_mess.
        CALL FUNCTION 'RH_MESSAGE_GET'
          EXPORTING
            arbgb             = 'VF'
            msgnr             = lwa_mess-msgnr
            msgv1             = lwa_mess-msgv1
            msgv2             = lwa_mess-msgv2
            msgv3             = lwa_mess-msgv3
            msgv4             = lwa_mess-msgv4
          IMPORTING
            msgtext           = lc_msgtxt
          EXCEPTIONS
            message_not_found = 1
            OTHERS            = 2.
        WRITE: /5 lc_msgtxt.
      ENDLOOP.
    ENDFORM.                    " process_vf01

    u can chk this code
    data:  wa_vbsk TYPE vbsk,
    wa_vbsk-smart = c_f.
    APPEND wa_komfk TO it_komfk.
            CLEAR wa_komfk.
            CALL FUNCTION 'RV_INVOICE_CREATE'
                    EXPORTING
    *                 delivery_date             = 0
                     invoice_date              = v_date "ur current date
    *                 invoice_type              = '    '
    *                 pricing_date              = 0
                     vbsk_i                    = wa_vbsk
                     with_posting              = 'D'
    *                 select_date               = 0
                     i_no_vblog                = ' '
                     i_analyze_mode            = ' '
                     id_utasy                  = ' '
                     id_utswl                  = ' '
                     id_utsnl                  = ' '
                     id_no_enqueue             = ' '
                     id_new_cancellation       = ' '
    **             IMPORTING
    *               VBSK_E                    =
    *               OD_BAD_DATA               =
    *               DET_REBATE                =
                    TABLES
                      xkomfk                    = it_komfk
                      xkomv                     = it_komv
                      xthead                    = it_thead
                      xvbfs                     = it_vbfs
                      xvbpa                     = it_vbpa
                      xvbrk                     = it_xvbrk
                      xvbrp                     = it_vbrp
                      xvbss                     = it_vbss
    *               XKOMFKGN                  =
    *               XKOMFKKO                  =
    Edited by: kartik tarla on Apr 3, 2009 10:28 AM

  • Issue: The user name changed when switch to other links in SCN

    Hi,
    I just wanted to bring to the notice of the moderators (as I don't know where can I report for the IT related issues) that for the past few days I am facing a peculiar behaviour when I log into the SCN through Internet Explorer 8.0. This is also being faced by my peers too..:)
    The issue is that when I login to SCN, I can see my user name on the top of the page(Home page). But when I switch to say 'Forum', the user name is changed and this is random. I kind of have access to his/her account.
    Even I try to log off, nothing happens.. The only solution left is to close the IE and then try to login again.
    Kindly have a look into this issue.
    Thanks in advance..:)
    Regards
    Amit

    Ive (along with many others) noticed the same problem with the Forums about 2 years ago, where after log-in or clicking a certain thread I find myself in someone's else's id. And the id keeps changing from time to time with no end in sight.
    The problem took about a couple of days to be rectified.
    pk

  • File size changing when pass through after effects  (180Mb file goes in and comes out 33GB on export)

    im processing a video recorded of an  interview where the lighting was not very good on the interviewee
    im brightening up the light on the interviewees face
    the file was a 180Mb  H.264 file on import 
    when i export the file its coming out at 33GB in size.... im not sure why this is
    i have chosen the default setting "lossless" as the format for export
    i just want the file to export the same size and quality as it was when i imported it
    what options should i choose for this?    AE does not seem to tell me how big the end file will be and it takes 1 hour and half to process this 2 minute interview so it will take me an awfull long time to get to the bottom of this if i try by myself
    thanks

    It doesn't "increase" the file size. You're making a brand new file.
    What you put into After Effects has nothing to do with the resulting file. You can have an AE composition with no footage whatsoever and the resulting file will be much larger than 0!
    After Effects works internally with completely uncompressed pixel data, so no matter what you toss into it, it produces whatever you tell it to produce. As Mylenium points out, you made an uncompressed final file.
    Your original video file is VERY compressed. So, of COURSE uncompressed video is going to look massive by comparison.
    Read Mylenium's link to understand a bit more and go here to learn AE: Getting started with After Effects There are lots of "gotchas" like this that'll bit your butt if you skip this basic training stuff.

  • Cell/Background color changes when copying to other Excel 2010 document

    When you copy and paste report cells (e.g. CO report outputted in Office integration, MS Excel) to a new Excel file, the background color changed dramatically (to bright red).
    SAP Theme:  SAP Signature Theme
    Excel 2010
    We tried paste option > match destination formatting but does not help.
    Anyone has similiar problems?  Appreciate any help.

    dear friend,
    you would do:
    1. search SAP Notes;
    2. check out the updates/patches for your MS Office;
    3. replicate it on another computer/another sap user (make sure it is a local issue)
    good luck!

Maybe you are looking for