Prompt for a new file name on first save

I’m creating a form with 15 pages. The user might want to fill out the form several times with different content. So I’m looking for a solution where the user is asked to give a new name when s/he saves the PDF file for the first time. So the original empty form is still available for the next case.
In Word I would create a template, so a document created based on this template has no name unless the user specifies one. I.e. when the user clicks on the save button for the first time s/he gets a Save as dialog.
In Adobe I did not find a similar thing. I tried to add a preSave event asking the user whether s/he wants to give a new name, however then the user will be asked each time to give a name, not only the first time. Maybe I could check the filename, however I wonder whether there is an easier solution.
Any help is greatly appreciated.

Why don you keep a control info in a hidden text field?
I have modified you code a little. (see the lines in red color)
If still not working, post your form to this forum to have a look at it.
Nith
ServiceProcurementNotice::docReady - (JavaScript, client)
var   
myDoc = event.target;
var saveFlag = true;
try
var userSave;
if(saveFlag)
     userSave = xfa.host.messageBox("Do you want to save changes to " + myDoc.documentFileName,"Save",2,3);
 if ( userSave == 3 ) 
app.execMenuItem("SaveAs");
saveFlag = false;
txtHiddenSaveFlag.rawValue = "false";       // If you want to keep this info even after closing the form
else
}catch
 (err){app.alert("Exception in save: "+err);} 
 if ( userSave == 3 ) 
app.execMenuItem("SaveAs");
saveFlag = false;
txtHiddenSaveFlag.rawValue = "false";       // If you want to keep this info even after closing the form
else
}catch
 (err){app.alert("Exception in save: "+err);}
 if ( userSave == 3 ) 
app.execMenuItem("SaveAs");
saveFlag = false;
txtHiddenSaveFlag.rawValue = "false";       // If you want to keep this info even after closing the form
else
}catch
 (err){app.alert("Exception in save: "+err);}

Similar Messages

  • Saving File with new file name

    I am subclassing JFileChooser and implementing ActionListener for being able to save and open files.
    I am using different file extensions (.ac and .ps), and when saving, I first check that the file name has the right extension.
    If it doesn't, I add the right extension.
    But for some reason it doesn't show my saved new file, even though in the debugger it goes through all the code of saving.
    Here is the main portion of my code before the code of saving (adaptee is my JFileChooser):
    File ananyaFile = adaptee.getSelectedFile();
    String name = ananyaFile.getName();
    int l = name.length();
    if (!(l >= 4 && name.charAt(l - 3) == '.' &&
    ((adaptee.getFileFilter() == adaptee.acExtensionFilter &&
    name.charAt(l - 2) == 'a' && name.charAt(l - 1) == 'c') ||
    (adaptee.getFileFilter() == adaptee.psExtensionFilter &&
    name.charAt(l - 2) == 'p' && name.charAt(l - 1) == 's'))))
    if (adaptee.getFileFilter() == adaptee.acExtensionFilter)
    name = name + ".ac";
    ananyaFile = new File(name);
    adaptee.setSelectedFile(ananyaFile);
    else if (adaptee.getFileFilter() == adaptee.psExtensionFilter)
    name = name + ".ps";
    ananyaFile = new File(name);
    adaptee.setSelectedFile(ananyaFile);
    Why does it not show my saved new file? Do I have to set it somewhere else?
    Thanks for your time!

    Ok, I put the code which adds the extension
    File ananyaFile = this.getSelectedFile();
    if (ananyaFile == null)
       return;
    String name = ananyaFile.getName();
    int l = name.length();
    if (!(l >= 4 && name.charAt(l - 3) == '.'  &&
       name.charAt(l - 2) == 'a' && name.charAt(l - 1) == 'c')  
       name = name + ".ac";
       ananyaFile = new File(name);
       this.setSelectedFile(ananyaFile);
    }into the approveSelection method of my subclass of JFileChooser.
    If someone wants to open a file without writing the extension and the file with the extension (which was added in my code) exists, it does get opened.
    Also, if someone wants to save a file without writing the extension and the file with the extension (which was added in my code) exists, it does ask if you want to replace the file (as I have programmed).
    But if you say yes, or if you want to save a file without the extension that doesn't yet exists (with the extension), it doesn't save it.
    However, saving works fine if someone writes the full file name into the File name box.
    Well, I would like to allow the user not to write the extension not only for opening a file, but also for saving a file.
    Please help! I am getting pretty desperate! Thanks!

  • Trying to save a document with a new file name

    I have a IMacOSX Lion
    I am very new to apple products
    How do I save an existing document with a new file name thereby having two documents the old one and the new one with changes? Once a document has been saved once opening File no longer offers the save or Save as choice. Clicking on Save a version does not work either. Please help!

    What application are you using?
    Most Apple apps have adopted a new file saving scheme for what you describe. In Pages, for instance, you go to the File menu and select Duplicate. You end up with two documents, one labeled xxx copy (if the original was xxx). Now you can save xxx copy by using Save from the File menu, and change the name to whatever you want.
    Hope this helps you. Best of luck.

  • Trying to do a password update but it asks me for a four digit pass code. Does anyone know if that would have been a significant date or set of letters or numbers I was prompt for in the past when I first bought my phone?  Thanks.

    Trying to do a password update but it asks me for a four digit pass code. Does anyone know if that would have been a significant date or set of letters or numbers I was prompt for in the past when I first bought my phone?  Thanks.

    It rather depends on where you are seeing the demand for a passcode. If, as I assumed, you are trying to change the password at http://appleid/apple.com then that will ask for a passcode if 2-step verification has been set up. On the other hand, if, as Csound1 has assumed, you have changed the password on that website and are trying to enter it in your phone (for which you need to sign out completely before you can do this) and are being asked for a passcode that can only be one you set yourself (unless of course the phone is second-hand in which case that would open a whole new can of worms).

  • Flash gives me an error when I compile after I 'Saved As' the FLA with new file name

    This seems weird. My code worked in the original FLA (using AS3) but when I 'Save As' as a new doc,
    It gives me a compiling error below:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at flash_fla::MainTimeline/frame1()
    Any ideas why this happens?
    Does it have to do with path to the Library? Is there a way to reset this within Flash or do I have to copy and paste the code to a totally new AS3 file?
    Thanks

    kglad,
    It doesn't specify what line the error takes place.
    The weird thing is...
    when I copy and paste the code on a totally new AS3 document and rebuild the movie clips within that document, it works fine.
    but for some reason...when I 'Save As' to a new file name, it's like it doesn't acknowledge the MovieClips in the Library anymore..
    It's kind of frustrating...
    Not really a show stopper....but it does waste some time.
    I don't know if you run into anything like this before.

  • Save data at given simple rate with new file name

    Hi,
    I'm using a PXI-5105 scope to acquire data generated by a function generator. Currently I am able to save the data displayed by the scope under a given name: test.txt
    What I would like to do is continously save the acquired data at a given sample rate under a new file name. In other words, when I first "turn on" the boolean switch, a first set of data is saved as test001.txt, 1 second later the new incoming data is saved as test002.txt and so on.
    I looked into this a couple weeks ago and thought I had found a VI posted by another user that did exatcly this, but I can't seem to find it anymore.
    I attached the VI I'm using to save the data. I'm still relatively new to LabVIEW, so my program isn't as efficient as it can be. I'm in the process of changing the program so the two switches don't conflict.
    Any help would be greatly appreciated.
    Best,
    Marc

    I forgot to attach the file. Here it is.
    Attachments:
    Acquire and Save.vi ‏34 KB

  • How I can make actions for write the file name in front image

    Hello All
    How I can make actions for write image(file)  name in front the image automatically in photoshop cs3.
    Thanks

    This script tutorial might be helpful:
    http://av.adobe.com/russellbrown/CaptionMaker_SM.mov

  • PLSQL sample for searching a file name in the server

    Hello All,
    what plsql package i need to use or any plsql sample code available for searching a file name in the server.
    For example If I provide any text "XX%", the plsql code should provide me the list of file names in a specific folder in server.
    If any one worked on this kind of requirement, please provide me the sample code.
    Thanks & Regards
    Aboothahir

    Hello,
    https://sourceforge.net/projects/oracle-jutils/
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584#1565062600346635117
    {message:id=4070746}
    Regards
    Marcus

  • Saving PDF under new file name

    Hi,
    I'm using adobe to complete forms and wish to save the form under a new file name every time I complete one.  Is is possible on the iPad?
    Thanks

    We do not yet have the ability to rename or make copies of documents, but that is a very good feature request!

  • Truly dumb question. How do I get PS to actually complete a command, eg straighten an horizon, and finalise the change. Even doing a "save as" with a new file name and reloading brings the image back, straightened, but with the skewed back ground frame st

    Truly dumb question. How do I get PS to actually complete a command, eg straighten an horizon, and finalise the change. Even doing a "save as" with a new file name and reloading brings the image back, straightened, but with the skewed back ground frame still there. Is there a "apply change" or similiar command that I simply cannot see.

    brings the image back, straightened, but with the skewed back ground frame
    PSE did what you told it to do. Choose the Straighten and crop edges or fill edges options when you use the straighten tool if you want it to do more than just straighten the contents of the image. Many people prefer the plain straighten because they'd rather crop themselves than let PSE do it.

  • Cannot save the Untitled.indd under a new file name.

    hi,
       i am using window.i got this message while save a document,Cannot save the Untitled.indd under a new file name.
    my code is,
    IDocument *docFrom = Utils<ILayoutUIUtils>()->GetFrontDocument();
    UIDRef docRef = GetUIDRef(docFrom);
    InterfacePtr<IDocumentUtils> docUtils((IDocumentUtils*)GetExecutionContextSession()->QueryInterface(IID_IDOCUMENTUTILS ));
    InterfacePtr<IDocFileHandler> handler(docUtils->QueryDocFileHandler(docRef));
    IDFile destFile;
    PMString path("E:/desktop/auquery.indd");
    FileUtils::PMStringToIDFile(path,destFile);
    handler->SaveAs(docRef,&destFile,kFullUI);
    ErrorCode result = ErrorUtils::PMGetGlobalErrorCode();
    pls help,
    thanks,
    screen410099

    Hi JADarnell,
                 desktop is a folder which i created in e: drive.And I found problem so pls give me a solution.
       Problem is i save a file without any changes its save but if i made any change in a document it doesn't save and one more information
      the  saveas method working in ActionComponent.cpp file in a project only.
    thanks,
    screen410099

  • The first binary file write operation for a new file takes progressively longer.

    I have an application in which I am acquiring analog data from multiple
    PXI-6031E DAQ boards and then writing that data to FireWire hard disks
    over an extended time period (14 days).  I am using a PXI-8145RT
    controller, a PXI-8252 FireWire interface board and compatible FireWire
    hard drive enclosures.  When I start acquiring data to an empty
    hard disk, creating files on the fly as well as the actual file I/O
    operations are both very quick.  As the number of files on the
    hard drive increases, it begins to take considerably longer to complete
    the first write to a new binary file.  After the first write,
    subsequent writes of the same data size to that same file are very
    fast.  It is only the first write operation to a new file that
    takes progressively longer.  To clarify, it currently takes 1 to 2
    milliseconds to complete the first binary write of a new file when the
    hard drive is almost empty.  After writing 32, 150 MByte files,
    the first binary write to file 33 takes about 5 seconds!  This
    behavior is repeatable and continues to get worse as the number of
    files increases.  I am using the FAT32 file system, required for
    the Real-Time controller, and 80GB laptop hard drives.   The
    system works flawlessly until asked to create a new file and write the
    first set of binary data to that file.  I am forced to buffer lots
    of data from the DAQ boards while the system hangs at this point. 
    The requirements for this data acquisition system do not allow for a
    single data file so I can not simply write to one large file.  
    Any help or suggestions as to why I am seeing this behavior would be
    greatly appreciated.

    I am experiencing the same problem. Our program periodically monitors data and eventually save it for post-processing. While it's searching for suitable data, it creates one file for every channel (32 in total) and starts streaming data to these files. If it finds data is not suitable, it deletes the files and creates new ones.
    On our lab, we tested the program on windows and then on RT and we did not find any problems.
    Unfortunately when it was time to install the PXI on field (an electromechanic shovel on a copper mine) and test it, we've come to find that saving was taking to long and the program screwed up. Specifically when creating files (I.E. "New File" function). It could take 5 or more seconds to create a single file.
    As you can see, field startup failed and we will have to modify our programs to workaround this problem and return next week to try again, with the additional time and cost involved. Not to talk about the bad image we are giving to our costumer.
    I really like labview, but I am particularly upset beacuse of this problem. LV RT is supposed to run as if it was LV win32, with the obvious and expected differences, but a developer can not expect things like this to happen. I remember a few months ago I had another problem: on RT Time/Date function gives a wrong value as your program runs, when using timed loops. Can you expect something like that when evaluating your development platform? Fortunately, we found the problem before giving the system to our costumer and there was a relatively easy workaround. Unfortunately, now we had to hit the wall to find the problem.
    On this particular problem I also found that it gets worse when there are more files on the directory. Create a new dir every N hours? I really think that's not a solution. I would not expect this answer from NI.
    I would really appreciate someone from NI to give us a technical explanation about why this problem happens and not just "trial and error" "solutions".
    By the way, we are using a PXI RT controller with the solid-state drive option.
    Thank you.
    Daniel R.
    Message Edited by Daniel_Chile on 06-29-2006 03:05 PM

  • Rename recorded avi file with new file name

    Dear all,
    I'm working on capturing video from a web-cam and storing files which use the time stamps as the file names. As my application must start storing the data as quick as possible, so I need to start the realized processor, create/open the datasink in advance, otherwise there will be a 10 sec time lag. In creating the datasink, I set the medialocator pointed to a temp file:TEMP.avi
    I store the files in the same TEMP.avi for each recording and I want to rename the TEMP.avi using the time stamp as the file name.
    I've tried the setOutputLocator() and tried to set the output as 2003_11_02_183023.avi, but it only work once, the next record still use the previous name.
    I've tried the renameto(), but it doesn't work.
    I've also tried the renameFile(), but it prompt "non static .. can not be referenced to static content".
    Are there any way to solve this problem ? It seems to be a simple file renaming problem, but ..
    Thanks in Advance !
    kan

    byte[] aviData = ...; // data from TEMP.AVI
    File file = new File(timestamp);
    FileOutputStream out = new FileOutputStream(file);
    out.write(aviData);
    out.flush();
    out.close();

  • Photoshop cs5 + Save For Web appends file names

    Hey everyone :
    Anyone know of a fix or a preference i can set? Hopefully, the response isn't "Can't do that anymore".
    Example file name/structure:
    Filename_partof-filename.version-01.00.psd
    Issue (save for web):
    CS3 - Filename_partof-filename.version-01.00.jpg
    CS5 - Filename_partof-filename.jpg
    Using a period as part of the file name was never a problem before CS5/5.5. Having to re-type half the file name in the SaveForWeb dialog is aggreviating/annoying to say the least. I know I can use hypens and underscores, etc but after using photoshop since v3 and using periods as part of my naming convention for 15 years, ...like I said, it's just an annoyance.
    Anyone come across this? Suggestions?
    Thanks tons,
    Greg

    Adobe Photoshop Version: 12.0.4 (12.0.4x20110407 [20110407.r.1265 2011/04/07:02:00:00 cutoff; r branch]) x64
    ...yep, everything up to date (more or less).
    This isn't a recent CS5 issue but a CS5 issue from the day it was released...I just got aggreviated enough today with it to come here and see if I could find an answer. It's definitely a SaveForWeb issue and not SaveAs.
    Here's a similar post from back in March 2011...http://forums.adobe.com/message/3509172#3509172
    Just to be clear...
    - Open new/old PS file
    - Save with name.name.v.01.psd
    - Quit PS
    - Re-open file
    - SaveForWeb
    ...if you're able to save it out with the file name in tact, I have no idea how.
    I've tried 4 different CS5 Photoshops and they all truncate the name after the first period.

  • Programaticly changing the (suggested only) file name in the save prompt when signing a document?

    When you sign a document in Adobe X (or XI), the system says it needs to save the file first.   Is there some way to change the (suggested only) file name to a different value for that save?
    Right now, people open a blank form - lets call it formX.pdf.   They fill it in and sign it.  The suggested file name for the save is FormX.pdf.   I can generate a unique file name which i'd like to put in place of the suggested default...

    AFAIK, you can't do it with code. Your best option might be to use a form field to show a message to the user when they sign the document with that information.

Maybe you are looking for

  • Powershell: There is no file with URL error during file upload.

    I am trying to put together a PowerShell script that I could use to upload files from a local directory, into a Document Library in a Record Center Site. Here is what my script looks like... #Open web and library $web = Get-SPWeb $webUrl $docLibrary

  • My iphone 4 will not back up to icloud

    how do i get my phone to back up to back up to icloud when in my itunes i have it set to back up to icloud and on my phone its on but ye it still wont back up to icloud?

  • Imlib_context_free() starting Conky ....

    I am trying to run Conky on ArchLinux x86_64, with LXDE. This is what I did. $ sudo pacman -S conky $ mkdir ~/.conkyrc $ cp /etc/conky/conky.conf ~/.conkyrc $ conky Then I get this ... Conky: missing text block in configuration; exiting ***** Imlib2

  • Bootcamp installation with Windows 7 Home Premium x64

    Hi, Here's my Macbook specs for starters: MacBook Pro, Retina, 15", Early 2013 I've been having a lot of trouble using Bootcamp to make a partition for Windows.  The problem is when I begin launching the Bootcamp assistant and get to the "Copying Win

  • Changing the "Move File" sound in Lion

    Hi - So in Snow Leopard, you could custom-change the ugly sound that you hear when you drag and drop a file to a new location.  The solution involved going into the HD, then drilling into a folder called System Sounds and finding and replacing an .ai