Import Text Data to text fields with folder level script

I am using Adobe 9 professional and have a folder level javascript to import text into existing fields of a pdf.
There are multiple fields with multiple rows of data to be imported.
The folder level script is not working (but there are no errors in the console showing when run)
I have manually tested opening the text file with the following code in the console and the text file opens and populates the text fields, so the text file must be correct:
this.importTextData();
The following code is the folder level script which is not working:
function mailmergeFunction()
// Import the first row of data from "Mailmerge.txt"
this.importTextData("/h/mail merge/Jo Smith's Things/Mailmerge.txt", 0)
if (typeof cnt == "undefined") cnt = 0;
this.importTextData("/h/mail merge/Jo Smith's Things/Mailmerge.txt", cnt++ % 4)
app.trustedFunction(mailmergeFunction);
app.addToolButton({cName: "Mail merge",cExec: "mailmergeFunction()",cTooltext: "Mail Merge",cEnable: true,nPos: 14});
If anyone can please provide some assistance, it will be most appreciated thanks.

Working fine now, changed the location of the file path - could have been something to do with having an apostrophe.
function mailmergeFunction()
app.beginPriv()
// Import the first row of data from "Mailmerge.txt"
this.importTextData("/h/mail merge/Mailmerge.txt", 0)
if (typeof cnt == "undefined") cnt = 0;
this.importTextData("/h/mail merge/Mailmerge.txt", cnt++ % 4)
app.endPriv()
app.trustedFunction(mailmergeFunction);
app.addToolButton({cName: "Mail merge",cExec: "mailmergeFunction()",cTooltext: "Mail Merge",cEnable: true,nPos: 14});
Thank you for your assistance George, much appreciate your help.

Similar Messages

  • Large Amount of text data in a Field

    I have a VB front end application and now need to store what could be a very large amount of text data in one field (ie more that a varchar field can hold) What data type could i use for the field and what is the capacity of this field
    Thanks

    hi
    BFILE is a data type in Oracle that allows you to store the location and name of any file. To store large anounts of text data, you better use this type. You can store all the txt into a '.dat" or".txt" or still ".rtf" and then save the file name and its location in the Oracle Database. I believe that ione can save upto 4gb of Data using this type. I never used this data tye, but just read about it in documentation. Hope it works.
    All the best.
    Kiranmayee

  • Text data is not displaying at Report level for an Infoobject Item name

    Hi All,
    Texts data is maintained at Info object level but text information is not displaying at Report level for an object.  I have set the property at query level as "Text", but at report level it is displaying key values of the object, not displaying texts information.  This problem occured in QA(Quality) system but not replicated in Production system.  I have checked all properties at backend and query level and compared the same between QA and Production system didn't find any difference.
    Please suggest what might be the cause: at report level it is displaying key values instead of the textual information even text data is mainintained at backend.  In production it is displaying textal data for the IO.
    Thanks in advance.

    Hi All,
    Thanks for your valuable information.  I have changed the setting under Advanced tab as "Master data" for Access type for results values, but didn't solved the problem still it showing key information for the IO.
    In Production system the report displaying texts information for the IO, but in QA its displaying key information. The problem exits only in QA, its working fine in DEv and Production.
    As per my understanding might be the issue with Patches will be checking with Basis team on the same.
    Please suggest if you have any alternatives to fix the issue.

  • Folder level script? How can I use field value as a pdf filename in save as dialog box

    I read somewhere that if you use a folder level script, you can do things like save a pdf with a specific filename - possibly based on a field name.
    How would one set up a folder level script?
    How do you execute a script from the PDF?
    What code would you use to change the PDF name to the contents of the fFieldName text field?
    Or, is this really just impossible to do?

    The article is interesting.  It suggests you place code like this:
    // Page Replacement Function
    var ReplaceLastPage = app.trustedFunction( function(cPath) {
    app.beginPriv();
    this.replacePages(this.numPages-1, cPath); app.endPriv();
    In the trusted folder.  What is the path of the trusted function(s) that get automatically loaded into Acrobat?
    I assume in the example above, function(cPath) is a function inside of the PDF...

  • Need help with folder level javascript to automate "save button" on a fillable form

    I have been racking my brain for the past 6 hours trying to get a simple save button to work.
    Background: I am using Acrobat Pro 11 to create a save button on a fillable form. My intent is for the end users (my team of 3, whos computers I have access to) to be able to fill out the form, click save, and have the filename appended with date and other info and saved to a local folder on their machine.
    I am attempting to take the default form name i.e. Support Call Log.pdf and have three of the feilds within the form generate a new file name. --> Support Call Log_Brad_121_2015
    End users will fill out the form using adobe viwer X.
    Instead of putting the code that I have tried, modified, and tried again and again. I would like to ask for a fresh start and then see if I can locate my error after. I need to know what to put in my folder level script, line for line.
    I also need to know the correct syntax and format to establish a new file name with the extracted feild data, saved to the same exact file path as the original document.
    Any and all help will be greatly appreciated, I am about to go crazy!!!

    Didn't let me do it, invalid. So, here is what I have now changed my button code to:
    //get field value
    var fv1 = getField("Technician:").value;
    var fv2 = getField("Date Received:").value;
    var fv3 = getField("Unit Number:").value;
    // Split Path into an array so it is easy to work with
    var aMyPath = this.path.split("/");
    // Remove old file name
    aMyPath.pop();
    var NewFileName = "Support Call Log" + "_" + fv1 + "_" + fv2 + "_" + fv3 + ".pdf";
    NewFileName = NewFileName.replace(/[\s\!\?\<\>\'\"\*\/\\\=\?\^\`\{\}\|\~]+/g, "_");
    aMyPath.push(NewFileName);
    //save
    mySaveAs(this,aMyPath.join("/"));
    Im still getting the error dialogue box, and nothing shows in my javascript debugger window when I click the button. Seems to be something goofy with my Folder level script:
    var mySaveAs = app.trustedFunction(
         function(oDoc, cPath, cFlName)
              cPath = cPath.replace(/([^/})$/, "$1/");
              try{
                   oDoc.saveas(cPath + cFlName);
                   catch(e){
                                  app.alert("Error During Save");

  • File System in Folder Level Script

    Is it possible to access the File System in a Folder Level Script. For example I want to check if a certain file exists in the folder containing active document & load info from that file in a dialog box.
    Thanks in advance

    But I don't want to add any content, bloat to the doc.
    I may just try to write a legit plug-in, since I have a little experiance writing C++ plug-ins for InDesign. But I wold like to just confirm that this functionality does not exist in Acrobat with scripting (due to sandboxing etc).
    Thanks

  • How to search "ActiveDocs" in folder-level script

    I am trying to perform a search in an Acrobat folder-level javascript like this:
         function timerCallback() {
              app.beginPriv();
              search.query(searchText, "ActiveDoc");
              app.endPriv();
         app.beginPriv();
         app.openDoc(path_to_my_doc);
         app.endPriv();
         app.setTimeOut("timerCallback()", 5000);
    I use the setTimeOut function to make sure that the document has had enough time to open before I start the search.  The problem is that I get this error:
              GeneralError: Operation failed.
              Search.query:24:Folder-level:App:SearchScript.js
              No active document
    It seems like I can't "see" active documents from a folder-level script.  Is there any way around this?
    Thanks

    A folder-level script can be used for two things:
    - Execute commands relevant to the application as a whole, NOT dependent of
    any specific document (e.g. adding new menu items).
    - Create functions which should be available to any document or script that
    might need them (e.g. formatting a string in a certain way).
    What you're trying to do is neither here nor there. If you want to be able
    to search existing documents, you can use a folder-level function, but then
    you need to call it from somewhere else, like a menu item or a toolbar
    button.

  • How do you wrap the text on an input field with type="button"

    I want to put 2 lines of text on an input field.
    The button size is fixed at 75 and if there is more than 10 characters it truncates the text.
    The input field is defined as :
    <input type="button"
    value="CI<br>Discrepency"
    class="buttons75x75"
    onclick="javascript:callForm('ciDiscrepency');"/>
    If you can show me how, I would really appreciate it.
    -Gary

    Dug up the code I used to do this a while back:
    //The style sheet
      <style type="text/css">
        .buttonUp {
          border-style:outset;
          border-width:2px;
          width:3em;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
        .buttonDown {
          border-style:inset;
          border-width:2px;
          width:3em;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
    </style>
    //... Example buttons
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';"
                            onclick="alert('Clicked on Small One');">He</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello World</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello<br/>World</div>
      <div class="buttonUp" style="width:5em;" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello World</div>You could put any javascript you want on the onclick event, so you would call the javascript you previously used to submit the form and set the input name. In this example I had all the buttons be a fixed width, if you leave out the width in the style sheet then the block will snap to fill the same width as the text inside it, much like normal buttons do. The difference is, with a fixed width then text wrapping occurs automatically (like in the 3rd button) while without a defined width the div will only display a second line when the line break is added. Note the the fixed width can be over-ruled by an inline style if needed (last sample).
    The website I pointed to before has a simpler solution (less javascript events needed). An implementation for his approach would be:
    //The style sheet
      <style type="text/css">
        .button {
          border-style:outset;
          border-width:2px;
          color:#000;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
          text-decoration:none;
          display:block;
        .button:active {
          border-style:inset;
          border-width:2px;
          color:#000;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
          text-decoration:none;
          display:block;
      </style>
    //... Example buttons
      <a class="button" href="#" onclick="this.blur();alert('Now you clicked linkey');return false;">Hello<br/>World</a>Same deal here with the fixed-width vs.fit-to-content. I add the 'return false;' to the list of the onclick commands so IE doesn't make the 'link clicked' noise and the URL doesn't go to thispage.html#.
    All these buttons work in FireFox 2, IE 7, and Safari 3 if they are running in STRICT mode. The button colors and borders don't precisely match FF and IE buttons, but they are close (although they aren't close at all to Safari buttons).

  • Is it possible to install folder level script automatically by any other application ?

    I want to install  folder level javascript through flex application .is it possible to do this or by any other technology.
    1 way to do is to copy file using file stream of that application but as directory for folder level javascript is protected one therefore file operation give i/o error
    any other solution .

    I do not think any Adobe product will allow you to do this for obvious reasons. '
    You can use any installer program the will perform the installation for users if the users decide to allow your request.

  • From text date to text date

    Hi guys, how can I get from
    April 2012 to 201201 ?
    april2012 is an nvarchar(max)...
    Don't mention it...is not my database.
    Thanks

    Done...
    select
    Convert (nvarchar(6), cast (replace(column1,'-','') as datetime), 112)
    it was something dirty
    Thanks everyone
    One small thing to note is date values coming from source has to be in consistent format otherwise it may break. This is especially important when source is a file
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Upload data thru LSMW -WBS with 3 levels

    Hi PS Experts,
    My situation is like I have to upload data thru LSMW for all Levels!  As I m doing for only L3 WBS with PD it is going upto 14 steps and executing.But for Level 2 and Level 3 it is not executing. In the Step "Read Data" it is showing blank.
    Can v upload these multilevel data thru LSMW? or how is like?
    Thanks in advance,
    Sanju..

    Hi Virendra,
    I think that your solution is very good for my purpose.
    But in my implementation there is no way to insert a new element in an existing WBS, I can only edit attributes for an element already created, for example, in cj02.
    I checked all the menus but i didn't find any useful command.
    Could you send me a screenshot of the keypoint in which you can create the element different from the first level?
    Thank you very much.
    Giorgio

  • Decode a blob field with a C script in a select query

    HI
    I have a coded field in a table which has been populated using 3rd party software. I need to decode this field so that i could rub a few reports. I have a C script that can decode this field but do not know how to call it up from a select statement.
    Is there any way of decoding this by calling up the C script in a select query.
    Thanks.

    can you duplicate this code into a PL/SQL function?
    Or else, you might try configuring your external procedures setup and call this routine (if it was available as a shared library or a DLL).

  • Need Text data table for GBSTA field(ref VBUP table)

    Hi frns,
    Can anyone suggest me the table to extract text data for the field GBSTA .
    Cheers,
    Shana

    Hi,
    The value range of domain "STATV" for field "GBSTA" is limited with fixed values. You can either read entries from Value range of domain "GBSTA" in SE11 or from table TVBST
    Table : TVBST with inputs
    SPRAS : sy-langu
    TBNAM : VBUP
    FDNAM : GBSTA
    Srikanth.

  • Master text data in Open Hub

    Hi All,
    I am working on BI 7.0 and am currently working on Open Hub. I have to extract data from a cost center infocube, but i also need to send the master text data for certain fields along with the infocube data into the file server.
    Is this possible with open hub services,could someone please provide me with a step by step procedure to this one.
    I have been following a similar thread
    Nav. Attrib in Open Hub 04s
    Please let me know if it was succefully implemented by someone.
    Regards
    Dipali

    Hi Uppala,
    Following are 2 approaches to achieve this
    Approach 1:
    1. Create info spoke which will extract data from cube to data base table (do not use file)
    2. Create one more info spoke which will extract master data text to data base table (again do not use file)
    3. Create join on both the data base tables.
    4. Write a ABAP program which will create a file based on the joins of tables.
    Approach 2 :
    1. Create multiprovider on cube and master data info object
    2. Create info spoke based on the multi provider, that will extract data to flat file
    For 2nd approach u have to put certain filters to avoid unwanted rows
    Regards,
    Ajinkya

  • Import tabular data not working with Word file

    The File-->Import-->Tabular Data feature works fine
    with a text file, but only puts in table tags
    (<table></table>) when I use a Word file (same data
    with same delimiter in both files).
    Any idea what's going on?

    You will not be able to use Import Tabular Data with a *.doc
    file - how
    would DW know what to import when you give it the entire
    document? You
    would need to use either a plain text file, as you have found
    out, or save a
    new document containing only the table, and import that.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Laura MS" <[email protected]> wrote in
    message
    news:flte4o$qmf$[email protected]..
    >I didn't know you could do that, so I tried it. However,
    it imported my
    >file as is, not as a table, which is what I need. Thanks,
    though.

Maybe you are looking for