Formcalc or Javascript equivilent of =now() in Excel

Could someone please tell me if there is a Formcalc or Javascript equivilent of =now() in Excel? I know there is that time function, but that seems to come out with a long number that doen't mean anything to me. I want to be able to tab into a field, and the field show the current system time in HH:MM format.
Thanks.

In JavaScript you would use the Date object:
// Create variables
var currentDate;
var hours;
var minutes;
var formattedTime;
// Get time
currentDate   = new Date();
hours         = currentDate.getHours();
minutes       = currentDate.getMinutes();
// Format time
if (hours   < 10) { hours = "0" + hours };
if (minutes < 10) { minutes = "0" + minutes };
formattedTime = hours + ":" + minutes;
// Display formatted time
this.rawValue = formattedTime;
In your case, you would put this script in the 'enter' event of your field.
If you are doing this across multiple fields, it would make sence to implement this as a function in a script object.
Ben Walsh
www.avoka.com

Similar Messages

  • Help with respect to Formcalc r Javascript

    Hai Experts,
            Can someone help me with demo code using formcalc
             or javascript to append a new row on clicking enter on a field in a table.
      My requirement is : i have a table in my Adobe form as follows:
    <b>   Mat_no           Quantity              Plant.</b>
       when i create a adobe form and send it thru mail i able to see only one row in the table. if the user enters first row and presses enter one more should be inserted.
      can some one help me with some sample to achieve this?????
    Thanks and regards,
    Madhu

    Hi,
    You need to slightly tweak the logic here.
    Take another internal table and declare a field of type dbtable-field1.
    Now...
    TYPES: BEGIN OF t_tab3,
                   field1 TYPE dbtable-field1,
                 END OF t_tab3.
    DATA: itab3 TYPE STANDARD TABLE OF t_tab3,
               wa1 TYPE t_tab3.
    LOOP AT int_table_temp INTO wa.
    MOVE wa-field1 TO wa_wa1-field1.
    APPEND wa1 TO itab3.
    ENDLOOP.
    IF NOT itab3[] IS INITIAL. "This check is Mandatory
    select * from dbtable into table int_table_temp for all entries in
    itab3 where dbtable-field1 = itab3-field1.
    ENDIF.
    If your dbtable field has higher length, You can use the offset aswell but not the right way.
    WHERE dbtable+0(length) EQ comparision field.
    Thanks,
    Vinod.

  • Upgraded and now word, excel do not work, upgraded and now word, excel do not work

    upgraded to 10.7.2 and now my excel, word etc do not work

    Office 2004 and older will not work with Lion.

  • Mix formCalc and javascript in same event?

    Hi Folks,
    I have a bunch of formCalc and Javasript I'm trying to merge (two different forms, different programmers).   Is it possible to mix javascript with formCalc in the same field event?   If so, how?
    thanks!

    No, it is not possible to mix FormCalc and JavaScript in the same event. You will get run-time errors.
    Steve

  • Can a code in FormCalc Or JavaScript be reused

    Hi,
    Does somebody know if we can share / reuse  existing code like JavaScript Function or FormCalc between
    different forms ?
    Thanks !

    Hi Oren,
    We did something similar recently, using a Fragment Library on a shared drive. One of our fragments includes javascript and it works fine.
    However, we only found how to use fragments as embedded, not referenced. Still that allows you to code once and easily pull the fragment into other forms. (Referenced would mean changes to the fragment in the library would show in all referencing forms. We don't know how to do that. If you figure it out please post!)
    Let me know if you would like more details.
    Hope this is helpful!
    Margaret

  • Converting formcalc to javascript.

    Hi there,  I would like to know if i can convert an existing formcalc script to javascript and if so how can it be done?

    The only way I know is "manually", means you have to write the scripts by yourself in the desired language.

  • The Bridge JavaScript Reference is now posted

    The URL: http://www.adobe.com/products/creativesuite/indepth.html
    Happy Scripting!
    Bob
    Adobe Workflow Automation Scripts

    Modeless pallet window, event callback, layout manager, localization, I like the UI stuff there. Will InDesign JS UI be like this in the future?
    One more: can we have a ExtendScript Database Connection for access to SQL database?

  • Setting Exclusion Group to Required in FormCalc or Javascript

    Hi
    I am looking for the syntax to toggle an Exclusion Group to required or optional
    For regular text fields I am using field.validate.nulltest="error"  or field.validate.nulltest="disabled" however for the exclusion groups thats not working.
    HELP
    Suggestions?
    Meir

    Hi
    Thanks for your response. It seems the code was ok the problem was that the behaviour of the exclusion groups is different depending on Version and wheter the form is static or dynamic.
    Again thanks for your response
    Regards
    Meir

  • I installed FF 4 and now the excellent Maxa Cookie Manager software won't work. Can I install and older version of FF over FF4? I could just uninstall 4.0 and re-install 3.* but I don't want to loose all my bookmarks.

    Maxa Cookie Manager software no longer records cookies since I installed FF4. So what will happen if I install FF 3.* over FF4?

    Glad to hear your prolbems have been sorted.
    Have had similar problems since performing a sofware update last week.
    Itunes has crashed.
    Can't be reinstalled.
    The software update won't work, neither will disk utility.
    Removing the .dmg files hasnt helped.
    Any suggestions?

  • LabVIEW Equivilant to excel functions?

    Hi, I'm trying to translate some equations done in Excel into LabVIEW.
    Does anyone know what the LabVIEW equivilant is for the Excel command:
    ROUND(x,0)
    Also, what is the equivilant for 
    INT(x)
    Many thanks, Alec
    Solved!
    Go to Solution.

    Matthew Kelton wrote:
    The Rounds in LabVIEW do not have decimal place inputs, so are equivalent to the ROUND, ROUNDUP, and ROUNDDOWN with the second parameter set to 0.  ROUND is Round to Nearest.  IF you want decimal places, you will have to do your own coding to shift the decimal places and do rounding.
    So Round(x,d) will impement as I missed the negate of d on the first shot
    Message Edited by Jeff Bohrer on 08-13-2009 11:01 AM
    Jeff

  • HT1338 I have OSX Maverick installed and numbers 3.0. Now I can not open previous excel spreadsheets?

    I have made every installation or upgrade put out by Apple for 3 years. Now my excel spread sheets previously created will not open since I installed OSX. Says I need to install numbers. At the APP store it tells me

    Are you sure you're using Numbers 3.0?  I understand you may have installed it, but make sure you're running the latest version as shown here:
    The latest Numbers may not have made ti onto your dock.  If it didn't, find it in your Applications folder and drag it onto your dock.  You can drag the old version off your dock and dispose of it (from an iWork 09 folder in Applications).
    If you are actually running Numbers 3.0, the Excel file may be encrypted.  See:

  • Calculation in Javascript or FormCalc "to the power"

    Hi,
    How can I caculate the following expression using either formcalc or javascript. The Expression pow(x,y) doesn't seem to be recognized.
    Expression: BSA.rawValue = pow(height.rawValue,0.45) * weight(weight.raxValue,0.72)
    or BSA = x^0.45 * y^0.72
    I couldn't find the answer in the forum.
    Thank you for your help,
    Olivio

    In Javascript the command should be:
    Math.pow(x,y);

  • Scripting in FormCalc

    Hi,
    I am a beginner at scripting FormCalc and would appreciate some help with syntax.
    I have a questionnaire type form with groups of checkboxes: the user selects a checkbox (one of five checkboxes in each group) as a response to each of many statements.An excellent example of this type form and FormCalc scripting was provided by a helpful colleague on this forum months ago:
    http://forums.adobe.com/thread/493795?tstart=0
    Now I need to add some script so that if the user does not complete one or more checkboxes, the final total will not be calculated, until all checkboxes are selected. If a checkbox (or more) are not chosen, then instead, the user will see a text box that states: please complete all selections. Once all checkboxes are selected (checked), then the total will be calculated and displayed.
    I am a little familiar with JavaScript, but this form (based on the above sample) is done in FormCalc. In JavaScript, I would have written something like (pseudo-code):
    if (form1.page1.subform1.q1 = "")
    || (form1.page1.subform1.q2 = "")
    || (form1.page1.subform1.q3 = "")
    //etc.
    //q1 is a checkbox button group of 5 checkboxes--the form has 13 groups q1 to q13
    form1.page3.subform3.Text6 = "visible"
    else
    form1.page3.subform3.Text6 = "hide"
    //calculate the sum of q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13
    Something like this. But, I don't think I can mix FormCalc and JavaScript.
    So, I'm lost and can't figure this out. Just want to make sure the user completes all 13 items (or else sees a text box asking them to complete all) so the final total is correct. If all 13 are not completed, the total will be wrong.
    Please help!
    Kind Regards,
    saratogacoach

    It is tricky to manage the presence of the message containers for each question when using the calculate event for the total. Take a look at the attached. It will calculate the total ONLY if all questions have been answered. However, the message container for each question displays '<< required' until the question is answered. It may give you some ideas for your specific requirements.
    Steve
    // form1.page1.subform1.total::calculate - (JavaScript, client)
    var q = xfa.resolveNodes("q[*]");
    var msg = xfa.resolveNodes("msg[*]");
    var total = 0;
    var a = 0;
    var missing_a = false;
    for (var i=0; i <= q.length-1; i++) {
        if (q.item(i).isNull) {
            msg.item(i).presence = "visible";
            missing_a = true;
        else {
            msg.item(i).presence = "hidden";
            a = parseInt(q.item(i).rawValue);
            total = total + a;
    if (missing_a == true) {
        this.rawValue = "";
    else {
        this.rawValue = total;

  • Can I create a form that doesn't trigger Acrobat's JavaScript disabled / security issues warning?

    Hello,
    Can I create a pdf that doesn't trigger Acrobat's JavaScript is currently disabled and this document uses it for some features.  Enabling JavaScript can lead to potential security issues.
    I even get this error when I create a blank pdf.
    I'm not using any JavaScript in the form and the nature of the message might tend to be a bit scary to some people since it mentions enabling JS can lead to potential security issues.  I basically want to disable the messaging of a feature I'm not even using.
    Anyone know if this is possible and if so, how I go about it?
    Thank you.

    Hi,
    I too share your frustration!!
    Unfortunately I do not have a complete answer for you.
    From the start I must say that Stefan Cameron has been very helpful (http://forms.stefcameron.com/2010/01/14/acrobatreader-9-3-now-available/), however I have not had sufficient time available to deal with the issue (or find a satisfactory resolution).
    The original post that Srini shared with you related to an XFA form that had FormCalc and Javascript in it. I will now share with you another situation that is closer to your experiences.
    Sometimes where we have a complex solution/form, we often give our users a PDF with instructions and demonstrations. We generate these using Adobe products:
    LiveCycle Designer ES to generate the solution/form;
    Captivate to record the demonstration (.swf);
    Acrobat to package it up in a static PDF.
    The screen shots below are from a PDF that includes written instructions and six Flash (.swf) files. The PDF does NOT include fields/form objects and does NOT include any FormCalc or Javascript.
    One of the big sells in Acrobat 9 was that Adobe had fully integrated Flash (Adobe product, ex. Macromedia) into Acrobat 9. This mean that .swf files could run natively inside a PDF. Brilliant!!!  The website today is still pushing this message, for example:
    Now bear in mind that the following screenshots are from a PDF that does not contain any scripting - its sole purpose is to "inform" the user, "look as good as the work I put into it", incorporate instruction and "multimedia" in a "single polished file" and I should be "confident that my audience will be able to view my work exactly as intended".
    Not so!!
    When the user now opens the form, all looks OK. No warning. They can read the instructions and scroll down to the multimedia (.swf files).
    However when the user clicks on the multimedia, the yellow bar appears:
    I go through the "trust" process:
    And the PDF looks like it is OK, no yellow bar. When I click on the multimedia, it begins to play - yes!! BUT ONLY FOR A SECOND OR TWO AND THEN IT STOPS AND GOES BACK TO THE START - AGGGGHHHHHHH!!!!!. I would apologise for shouting, but this is beyond frustration. The work in capturing six screencasts in Captivate, annotating them, publishing to .swf and packaging up in Acrobat has been a complete waste of time. Worse than that I now have several PDFs out there, that do not work. Good advertisement for my business? I don't think so!!
    The document that Stefan provided (Managing JavaScript Execution in the Acrobat Family of Products) does not mention Flash/.swf as being a problem. However I would recommend that you go through this document, as it may help you.
    So, where to now? I don't know. The previous posts and Stefan's responses have several urls that may help. You should maybe consider logging your experiences as a bug (log at Adobe).
    In the meantime good luck,
    Niall
    UPDATE:
    This behaviour (.swf playing for only a few seconds) happens in PDFs where the .swf is inserted as legacy media to run in earlier versions of Acrobat/Reader. In this case Acrobat/Reader is making an external call to Flash Player. Hence the yellow bar. However it does not explain why the Flash video still does not play when trusted.
    If the .swf is added into the PDF as Flash media to run on Acrobat 9 and above, then it works without displaying the yellow warning bar.
    So maybe any feature of your PDF that calls an external resource is likely to show the yellow warning bar.

  • "Script failed (language is formcalc...)" - "Error: Argument mismatch..."

    Hi there,
    I temporarily switched from JavaScript to FormCalc just to see what functions were available.  It didn't have what I was looking for, so I did not add any functions, I just browsed, then I switched back to JavaScript.  However, now when I view my PDF I get the following error messages which were not there before:
    Any help would be appreciated.
    Thank you.

    What do you do if you didnt create the form?  and also people in other places, offices, can open it with no errors, but everyone in this office is getting errors?

Maybe you are looking for

  • Can we schedule sender file channel for every 2 hrs??

    Hi all, I want to run sender channel for every 2hrs. i searched in Availability Timings but there is no such facility to schedule the channel for every 2 hrs There is an option to schedule the channel on daily basis and for how much duration time it

  • IMovie lags when editing video

    Hey guys So I just updated iMovie to iMovie '11 and no I have problems with editing videos. I had many clips and I imported them into the program and the whole thing was about 45 minutes long. I started editing and everything was absolutely fine, no

  • Question about using an old MAC as a storage source

    Greetings all: I have a G5 tower (OS 10.4) with about 2 terrabytes of hard drives integrated into it; I need to use my intel core duo laptop to do most of my photography now (using SL) and was thinking of just using the tower in 'target mode' to take

  • Windows 2008 Standard SP1 will Support MS SQL Server 2008R2 Enterprise Edition ?

    Dear , Currently we are running MSSQL Server Enterprise 2008 Edition on Windows 2008 Standard Edition 64Bit (.Net 3.0). Now we are upgrading the MSSQL Server to 2008R2 Enterprise with SP2. Will it support to upgrade on the same OS or do we need still

  • Crystal Reports and UCCX

    I am running UCCX 8.0(2) and I am trying to connect Crystal Reports to the database but the documentation states only V11 will work is that really the case? We are not able to get Version 11 only Version14 is now available. Is there anyone running th