Using JavaScript to determine the name of the file a form

We have a lot of forms, and in many cases, our custom JavaScript if applies to all forms in a given folder. We want to determine the name of the file of the form so that we do not have to list each shape in a giant 'IF' statement.

Has anyone found how to determine the folder of a form using JavaScript?

Thank you!
-Jake

Hey Jake,

Is good enough record id, it should not change anyway.

Alert (externalFormId);

will provide the folder under that accessed the form.

See you soon

John
http://John-Goodwin.blogspot.com/

Tags: Business Intelligence

Similar Questions

  • Hello, I would like to use JavaScript to update the PDF file.  I saw the 'function' 'SearchAndRedactCmd' where can find no information about it. At that moment, I just find information on what it easy as all THE

    Hello, I would like to use JavaScript to update the PDF file.  I saw the 'function' 'SearchAndRedactCmd' where can find no information about it. At that moment, I just find information on what it easy as all THE

    There is no such command in Acrobat JS. Maybe it's the name of an item in menu or function, that someone wrote.

  • How to use JavaScript to limit the number of boxes to check the user can select a PDF form?

    How to use JavaScript to limit the number of boxes to check the user can select a PDF form?

    Here's the working solution

    Please rename all the boxes like chkBox0, chkBox1... .chkBox30 (must start with 0)

    Value of exports of each checkbox must be "Yes" (default value is Yes)

    Place this Code at the level of the Javascript Document

    -Code JavaScript document-

    var counter = 0;                Checked the meter

    -Count boxes checked again when the document is closed and reopened.

    for (var i = 0; i)<= 30;="">

    If (getField("chkBox"_+_i).value == 'Yes') {}

    Counter += 1;

    }

    }

    -The function of validation-

    function validateCheckBox(name,value) {}

    If (value == 'Yes' & meter)<>

    Counter += 1;

    } else if (value == 'Off') {}

    counter = 1;

    } else {}

    getField ("name") .value = "Off";

    App.Alert ("you can select only four checkboxes");

    }

    }

    -End of Document Javascript-

    Now put this line in the MouseUp event all checkboxes

    Box - Code MouseUp event.

    validateCheckBox (event.target.name, event.target.value);

    //----------------------------------------------------------------------------------

    Hope this will help

    Kind regards

    Post edited by: Mohammad Irfan

  • How to use NIDAQmx to determine the number of lines correlated DIO?

    How can I used NIDAQmx to determine the number of correlated DIO lines that supports a device?  For example, the NI6225 supports 8 correlated digital of/s lines while the NI6229 supports 16 correlated digital of/s lines.  How can I used NIDAQmx to determine the NI6225 supports only 8 lines while the NI6229 supports 16 lines?

    I moved this question from a previous thread.

    Thank you

    Ian

    Here is a code snippet that implements the regular expression detection:

  • How to use JavaScript to change the named view

    How to use JavaScript to change the named view

    Do you mean to jump to a specific Destination named within a PDF file? SE so there

    the method gotoNamedDest of the Document object.

  • Given the file name or path contains Unicode or DBCS characters. Retry using ASCII characters for the file name and path whatever that means? This happens when I publish an OAM

    Given the file name or path contains Unicode or DBCS characters. Retry using ASCII characters for the file name and path

    What does that mean? It happens when I try to publish an OAM for Dreamweaver.

    Also: How can I specify the onboard browser animate? It's just going as far. Are there no preference to animate it dashboard?

    BTW. Just call him edge. Seriously. You call Illustrator draw? Photoshop editing?

    No, my file name is mainContent.oam

    My project name is mainContent.an

    This error occurs when I try to import into Dreamweaver. Sorry, I was unclear about that earlier.

    I thought maybe it was because I had saved my image as a png image. So re-saved as an svg, still get the error.

    Should I have a setting is CC of Dreamweaver that will not? I should try this in Dreamweaver CS6? I might try that next.

    Why is this so difficult program? I know that Flash. I know that After Effects. I can work the chronology part simply awesome. He's still export I have problems.

    On a MacPro, 10.7.

    You are a person of Adobe or simply a beautiful assistance program?

  • Using Javascript - is this the best way

    Hi all
    I'm not very saavy Javascript please bear with me. I searched the forum and have not been able to find an answer (but maybe it's because I could not properly ask)

    I think I need to use Javascript to get the Entry1Date to change if the text in entry1 of changes on the ground. Then initailly, the field is empty so there no populated date. But after that the user enters data for example "call Bob" when they tab out or the entry1 loses focus, I want entry1date to be pouplated with and then the sysdate is they go back and change to 'Call Fred' the entry1date will change again. There are several fields like that so I don't want the user to have to submit the page each time, but when they do not, it will save to the database with the date and the most recent data... Several people will update some of the form fields that I think might be a problem of savings and I would appreciate suggestions as to relieve as well... Thanks for your patience with a Javascript newb. example of the type of fields is below:

    created_by
    Date_created
    Team1_contacts
    Team2_contacts
    Team3_contacts
    Entry1
    Entry1Date
    Entry2
    Entry2Date
    Input3
    Entry3Date

    Wally

    You're in luck then! ApEx 4 introduced dynamic actions, which should you get just to be without having to return to Ajax & application process. You can define a dynamic Action that will trigger a change in a component-based and allow you to set the value of another article, and you can specify that the value comes from the database, as a

    select sysdate from dual;
    

    This tutorial should provide information to help you get started: http://st-curriculum.oracle.com/obe/db/apex/r40/apexdynactions/apexdynactions_ll.htm

    Look specifically at "Creating a Set value Action with a dynamic SQL statement" - location appears a Department when changes in point of service, but you'll get the idea.

    Hope this helps,
    John

    If you find this information useful, please do not forget to mark the 'useful' or 'correct' post so that others benefit as well.

  • Using javascript to resize the height of the div

    I use javascript to resize the two div (div "navbar" of navigation on the left of the page) and the 'mainContent' div which is her right.

    The attached code shows how I do. The first three lines are added to my model, and the rest is the content of the javascript file (which I have not changed).

    He used to work, but as a result of changes to my Web site, it seems to have stopped working. I checked the paths.

    Can anyone suggest why it might be failing?

    Found the answer. I had changed the navigation bar to use a list of content then that before the content in paragraph tags. If the call to the function required to account for this, IE to become

  • JavaScript to embed the file as an attachment

    I found a Javascript script on the forum that allows me to have a user of the form to join a file a PDF form in Adobe Reader.  The script is below and works very well... until I consult the document saved on a computer.  I discovered that Adobe Reader Mobile doesn't recognize attachments added as annotations (only the embedded files).  Can someone help me to modify this script so that the file is truly integrated and not added as an annotation?  My follow-up question is the javascript to detach the file with a button.  I use Adobe Acrobat DC to set the shape.  Thank you very much for your help!

    The way in which it is programmed, it's that the button itself with an action of mouse upward, the following Javascript code is executed:

    If (app.viewerVersion < 11) {}

    import_pre_11();

    } else {}

    import_11();

    }

    Then, there's a document level javascript to attach the file that is scheduled as follows:

    Initialize the attachment number

    attachment_num = 1;

    Original location of file attachment icon

    The value of x is incremented below

    FOPI var = {x_init:-72, 72 - x:, y: - 72};  In the lower left corner of the page

    function import_pre_11() {}

    If (app.viewerType = 'Reader') {}

    App.Alert ({}

    CMSG: "you must user Reader version 11 or later to attach files to this form."

    CTitre: "attach file error"

    nIcon: 3,.

    nType: 0

    });

    return;

    }

    Invite the user to import a file

    App.Alert ({}

    CMSG: "click the OK button to select a file on your system.',

    CTitre: "attach a file",

    nIcon: 3,.

    nType: 0

    });

    try {}

    var rc = this.importDataObject ("Attachment" + attachment_num);

    If {(rc)

    attachment_num += 1;

    App.Alert ({}

    CMSG: "attachment successful.\r\rOpen Panel attachments to access attached files.",

    CTitre: "attachment Successful."

    nIcon: 3,.

    nType: 0

    });

    } else {}

    App.Alert ({}

    CMSG: "attachment canceled.",

    CTitre: 'attachment cancelled. "

    nIcon: 3,.

    nType: 0

    });

    }

    } catch (e) {}

    App.Alert ({}

    CMSG: 'could not attach file.',

    CTitre: 'could not attach the file.

    nIcon: 3,.

    nType: 0

    });

    }

    }

    function import_11() {}

    try {}

    var annot = addAnnot({)

    page: event.target.page;

    type: "FileAttachment,"

    Author: the form "user."

    name: "attachment".

    point: [oFAP.x, oFAP.y].

    content: "the folder entry on:" + util.printd ("yyyy/mm/dd hh: mm:", Date()) new, "."

    attachIcon: "Trombone".

    });

    annot.cAttachmentPath; Prompt the user to select a file to attach

    oFAP.x += 18;  Increment the x for the icon location

    } catch (e) {}

    App.Alert ({}

    CMSG: "could not reach file.\r\rPlease report this error."

    CTitre: 'file attachment error. "

    nIcon: 3,.

    nType: 0

    });

    }

    }

    I know, I wrote it. Player cannot add the embedded files, even manually, unless the file player compatible with the use of the right embedded file attachment.

  • After the update the new version cannot determine file downloads. In the eyes to determine the file, but download files go in C / documents and settings even

    After the update the new version cannot determine file downloads. In the eyes to determine the file, but download files go in C / documents and settings even if I chose another folder

    Hello, there is a general regression in firefox 27 allowing any files to upload directly to a root drive. Please try to create a subfolder (like D:\Downloads) and set as the default location for downloads...

    See also bug #958899.

  • By using only the keyboard, how can I create an email using Outlook Express, have the files of "painting" in the body of the email

    original title: only the keyboard

    By using only the keyboard, how can I create an email using Outlook Express, have the files of 'paint' in the body of the email, also registered another Web page?

    Hi r. Gull,.

    You can view using Outlook Express keyboard shortcuts, documented in:

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/mail_hotkeys.mspx?mfr=true

    I hope this helps.

  • I created a website with Muse using a slide show widget a little over a year.  I gave up Muse bur have recently re-enroll as a single Train to examine the use of Muse. The file for the my site is no longer on my computer or lea

    I created a website with Muse using a slide show widget a little over a year.  I gave up Muse bur have recently re-enroll as a single Train to examine the use of Muse. The file for the my site is no longer on my computer or at least I find and I want to make changes.  Is there a way to download the Internet Web site and bring Muse to make changes or I have to start all over again.

    Hello

    to copy entire websites is an arduous task in my eyes. Your sounds to me that you have access to your old site. If you could perhaps talk to your supplier at the time, to get it back.

    Hans-Günter

  • Determine the file name lengths

    Is this possible in Windows 7 to determine the length of the file names in an old and its subfolders?

    I tried some freeware programs that are supposed to do, but with not much luck.

    Thank you

    Sounds like pretty simple job for someone who knows how to write scripts that run in Windows, in something like Visual Basic.  Until this person comes to help here, I will mention that a method I've found is to go to the desired folder, copy the filepaths of the elements there, paste into an Excel sheet and use formulas to deal with the results.

    More details: when opening the file (or do a search in this folder), click on organize, click Select all, press on and hold down the SHIFT key and right-click on any file name, click Copy as path, go to an Excel spreadsheet and paste it into cell A2 to display a column to fill with paths.  Because we want to count the characters in the names of files and no paths together, we have a few delicate manufacturing formula Excel.

    I did the labels column for cells A1 to E1: entirepath filename extension namelength pathlength.  B2 E2 to cells contain these formulas:

    B2

    = IF (ISERROR (FIND("\",A2)), A2, RIGHT (A2, LEN (A2) - FIND ("|", SUBSTITUTE (A2, "-","|", LEN (A2) - LEN (SUBSTITUTE(A2,"\",""))))))

    C2

    (= IF (ISERROR (FIND(".",B2)),"", RIGHT (B2, LEN (B2) - FIND ("|", SUBSTITUTE (B2, ".","|", LEN (B2) - LEN (SUBSTITUTE(B2,".",)))) "" ")))

    D2

    = LEN (A2)

    E2

    = LEN (B2)

    Note that the namelength will include characters from file extension, or at least it did for me: I always keep the setting to display the file extension in Windows.

    For all information from production lines according to the formulas, select cells B2 to E2, copy, select the cells on the lower lines of the C2 at the last line with a filepath showing and paste.

  • When you use quite imposing, more the file obtained only receives a Temp name that will be sent as a document name.

    Our company has recently updated form Acrobat 8 Professional for Acrobat Professional XI. We also use him very imposing more plug-ins in both versions. Now, when quite imposing and the resulting file is only given a name of Temp that will be sent under the name of the document to the printer unless the imposed document is the first recorded. This was not the case in Acrobat 8 Professional. I've attached screenshots which shows an example.

    quite.jpg

    Is there a reason why this is happening and how we can stop it.

    Adobe and Acrobat do not control it. The name of the file and its location is quite a large function.

    For more help on this issue, please communicate with any software.

    -Dov

  • determine the sequence of form fields with barcode

    Hello

    In the part of the form with barcode design, we will extract data using the scanner at hand for excel file or notepad.

    Can we determine the sequence of fields of data (output) in the form designer?

    Need your kind advise for that matter

    Thank you

    Raja

    Raja,

    Here is a simple example of a custom bar codes for a PaperFormsBarcode encoding using a pipe delimiter.

    The "Barcode encoding text" field contains the value of the PaperFormsBarcode object. It is a useful debugging technique.

    The event on the PaperFormsBarcode object calculate done encoding.

    Form1.Page1.Subform1.barcode::calculate - (JavaScript, client)

    If (xfa.host.version< 7.05)="">

    this.rawValue = "";

    }

    else {}

    this.rawValue = encodeBarcode();

    }

    function encodeBarcode() {}

    define variables of barcode

    var firstName;

    var name;

    var Address1;

    var address2;

    City of the var;

    var State;

    var zip code;

    check for null name

    If {(form1.page1.subform1.firstName.isNull)

    firstName = "";

    }

    else {}

    firstName = form1.page1.subform1.firstName.rawValue;

    }

    Check for null name

    If {(form1.page1.subform1.lastName.isNull)

    lastName = "";

    }

    else {}

    lastName = form1.page1.subform1.lastName.rawValue;

    }

    Check the null address

    If {(form1.page1.subform1.address1.isNull)

    Address1 = "";

    }

    else {}

    Address1 = form1.page1.subform1.address1.rawValue;

    }

    Check the null address

    If {(form1.page1.subform1.address2.isNull)

    address2 = "";

    }

    else {}

    address2 = form1.page1.subform1.address2.rawValue;

    }

    check out the city for null

    If {(form1.page1.subform1.city.isNull)

    City = "";

    }

    else {}

    City = form1.page1.subform1.city.rawValue;

    }

    check the status for a selection zero

    If {(form1.page1.subform1.state.isNull)

    State = ' ';

    }

    else {}

    State = form1.page1.subform1.state.rawValue;

    }

    check the ZIP Code for null

    If {(form1.page1.subform1.zipCode.isNull)

    Postal code = "";

    }

    else {}

    Postal code = form1.page1.subform1.zipCode.rawValue;

    }

    build the barcode for the encoding string

    var str = firstName + ' | '.

    + Name + "" | ""

    + address1 + "" | ""

    + address2 + "" | ""

    + City + "" | ""

    + State + ' | '.

    + Postal code;

    Returns the string encoding

    return (str);

    }

    Steve

Maybe you are looking for

  • Mac Pro SSD upgrade

    I have an 8 Core 2.4 GHz Mac Pro which makes use of all the interior spaces SAT 4 drive mid-2010. I would add an SSD to gain some speed and from what I've read a 500gig drive would be correct. That would store my data of user on the existing OS X SAT

  • Is it possible to disable or remove an add-on from the outside of the FF (it does not start after adding an addon)

    I installed the addon and now FF won't start and seems to be a loop. Is it possible to uninstall the addon or configure FF so that it starts with disabled addons? Don't forget that FF does not at all so I don't have access to one of the internal func

  • Satellite A200 - modem reports no dial tone

    My internal modem reports no dial tone, but the line does not operate normally.In the control panel it says modem is not functioning normally.It worked last week and now suddenly stopped. Murray

  • W30T-A-101 - battery #2 satellite: Absent - even when it is docked

    After his return from the first W30T-A-101 because of his failure, we are now on a second unit. The second unit appears not to recognise the second battery in the keyboard; or there is a problem with Windows 8.1 and the material. Battery #1 watch loa

  • Tecra M7 - features of the utility of logon access Code

    The functionality of logon access Code of the Tablet does not work. The installer works fine until you enter the code, when I try to write in the box made unbranded and I so can't further in the wizard.Does anyone else have this problem? Thanks in ad