Set Document Actions

Hi,
I simply want to notify a user that a required field is blank when they print or save the PDF.
Based on other posts in the forum, I added the following JavaScript in Set Document Actions > Document Will Save and Document Will Print.
function checkField(aField)
if (!aField.required)
    return 1;
if (aField.value == "") // empty field
    var msg = "No Required fields can be left empty.";
    app.alert(msg);
    return 0;
return 1;
} // end of function
However, when I leave a required field blank, I don't receive the message.
Is there an error in the JavaScript above?  Does it matter that some of the required fields are text and some are numbers?
Thanks for any assistance,
Natalie

You will have to "walk" the array or run the test on each element of the array of field objects. You should change your code to return the result from testing all of the fields and not just an individual field.
Also you may need to check that the field is field that can be tested for the "required" property and for some fields like check boxes or radio buttons you may need to perform some additional test.

Similar Messages

  • Acrobat X Pro: Action Wizard to Set Document Action

    Good Day All,
    I would like to build an Action which adds a "Document Will Print" javascript Document Action but for the life of me cannot figure it out. Would anyone know how I would do this? If this is not possible, can I build an Action which will add Javascript to a PDF in order to accomplish the same thing?
    Thanks for the help!

    Hi ekobpc,
    Are you using the latest version of Acrobat X i.e. 10.1.12
    Does this happen to every pdf file or any particular one?
    You may also try 'Repair Acrobat Installation' option from the 'Help' menu to check further.
    Regards,
    Anubha

  • When saving a PDF from a FrameMaker book, is it possible to set document filenames as bookmarks in the PDF?

    When saving a PDF from a FrameMaker book, is it possible to set document filenames as bookmarks in the PDF? Currently when I have a Framemaker book that I want to save as a PDF, I choose Save Book As and then choose PDF for the file format. A dialog box comes up in which I can choose the Bookmarks tab and choose which tagged content I want to be made into bookmarks in the PDF file. What if I would rather have the filename of a document rather than the chapter title be a bookmark in the PDF? Is that possible? Where would I choose that option? Thanks!

    There are two ways that you could do this. You can either use postscript text frames and enter the correct pdfmark entries to show the file name with the corresponding actions (i.e. where to go in the PDF) or you can use hidden text in FM and the "Filename (Short) " variable in a unique paratag to be picked up by FM's bookmark creation.
    To go the pdfmark route, see http://www.pdflib.com/fileadmin/pdflib/pdf/pdfmark_primer.pdf for details and also consult the Adobe Pdfmark Reference manual (http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdfmark_reference.pdf).
    The hidden text route would use FM's Color Views to specify a colour as Invisible. This will make the content visually disappear from the screen (and any output), but FM will still be able to read the contents of any text that is coloured with the Invisible colour(s).
    1. Pick or create a colour that you want to be invisible. [Magenta is usually a good bet and stands out visually].
    2. Set that colour to be invisible in View 1 and visible in View 6. [you can use the shortcut <esc> v 1 and <esc> v 6 to toggle between the views.]
    3. Create a paratag to use for the filename and set the font colour to use the invisible colour.
    3. In the title of each chapter file, drop an anchored frame that is set to be outside of the text frame [so it won't interfere with any other content].
    4. In that AFrame, insert a text frame and use the invisible paratag defined in step 3.
    5. Insert the Filename (Short) variable in that text frame.
    6. Repeat steps for all files to be included in the bookmarks.
    When creating the PDF bookmarks, select only the paratag used for the invisible colour.
    Don't forget to toggle the View to be invisible (i.e. <esc> v 1  - this also works at the book level for all files in the book).

  • How to set document "dirty" flag

    Hi I wonder if there is a  simple way to set document "dirty" flag.
    The thing is that I am modifing layer XMP info in action script but this change is not reflected by setting the document to modified state
    Lukas

    I wonder how fast it would be to set the currect layer colour?
    IE:-
    layerColour('red')
    function layerColour(colour) {
        switch (colour.toLocaleLowerCase()){
            case 'red': colour = 'Rd  '; break;
            case 'orange' : colour = 'Orng'; break;
            case 'yellow' : colour = 'Ylw '; break;
            case 'yellow' : colour = 'Ylw '; break;
            case 'green' : colour = 'Grn '; break;
            case 'blue' : colour = 'Bl  '; break;
            case 'violet' : colour = 'Vlt '; break;
            case 'gray' : colour = 'Gry '; break;
            case 'none' : colour = 'None'; break;
            default : colour = 'None'; break;
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var desc2 = new ActionDescriptor();
            desc2.putEnumerated( charIDToTypeID('Clr '), charIDToTypeID('Clr '), charIDToTypeID(colour) );
        desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), desc2 );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );

  • How to set fire action event for particular rows in a table

    HI All,
    I have a requirement in which I want to set fire action event for particular rows in a table based on some condition.
    The table has columns like fullname,employee id etc.
    So i want to set fire action event for particulars rows only which will saisfy some condition.

    Atanu,
    Your approach(setting fire action for few rows) seems not possible. Better to go ahead with workaround.
    Do you want this functionality in processRequest(while page loading) or processFromRequest(on some event) method ? Give more explanation regd. your requirement ?
    In either case loop through the rows and when your condition is met write the action to be performed in controller.
    Regards,
    Anand

  • Issue with setting an Action Listener for a Command Button

    Hi all,
    I'm trying to set an action listener for a CoreCommanButton in a backing bean. Here's my code:
         CoreCommandButton editBtn = new CoreCommandButton();
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",null);
              editBtn.setActionListener(mb);
    //Action listener method
         public void doButtonAct(ActionEvent actionEvent)
    I keep getting a javax.faces.el.MethodNotFoundException error. However when I remove the ActionEvent parameter in doButtonAct(), I get a wrong number of arguments error.
    So i'm guessing there is something wrong with the parameters i accept in my action listener method. what can be causing this issue?
    Cheers.

    I figured this out.
    Since doButtonAct() requires an ActionEvent object as a parameter, i needed to define the parameter type when I create the method binding.
    Solution:
         Class argsString[] = new Class[] { ActionEvent.class };
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",argsString);

  • How can I add a picture to the Automator Action "Watermark PDF Documents.action"

    Looks like a bug: under 10.7.2 i cannot add a picture to the Automator Action "Watermark PDF Documents.action".
    Works perfectly under 10.6.8.

    Its a verified bug (Automator - Watermark PDF Documents).
    Please report to http://www.apple.com/feedback/macosx.html
    As a workaround, if you saved the Action in SL, option-click the action, navigate to the file "document.wflow", open in TextEdit, search for the key "fileNames" and replace your old image with the new

  • How to export a set of actions CS4

    Hi,
    I was wondering if you can have a file and take a look at the actions you have done and export them to another computer. If you can, how would you. Thanks

    Just find the file the action set is in, which the file name is the name of the action set +.atn (that is on a PC not sure if it is the same on a Mac), and copy it to the Actions folder on the other PC/Mac. Then once PS is open Load that set of actions.

  • Problem in setting up Actionable Emails

    Hi
    Hope you are doing fine
    I'm finding problems in setting up Actionable emails in Human Tasks.
    The mails are coming fine, with approve/reject buttons, but when I click on either of those buttons and send the email, nothing is hapenning. The same, when done using workspace is working fine.
    So I think this is something to do with the configuration.
    Before setting up the configuration, I have the foll details
    OutgoingMailServer, port
    IncomingMailServer, port, userName(say ActionableAccnt), pwd (which I'm using for actionable email)
    Here is my setup:
    In email driver notification under UMS
    Sender Address : [email protected]
    Default Sender Address : [email protected]
    provided outgoingMailServer, port, incomingMailServer, port, username, pwd
    And setting in Workflow Notification Properties
    From Address : [email protected]
    Actionable Address : [email protected]
    ReplyTo Address : [email protected] (this is a dummy address)
    Please note that in every emailId entry except the replyToAddress, I've used the same valid emailId [email protected]
    Is this ok? I'm ok even if the replyTo and actionable addresses are same.
    I've restarted the server. But its not working.
    Did I miss something here?
    I've gone through the documentation, some blogs, but could not find any.
    Would you please help me in this regard.
    Thanks in Advance
    Regards
    RaviKiran

    Hello there.
    Here's the ServiceLocator and delegates I am using....
    // LoginDelegate.as
    package com.myproj.products.business {
         import com.myproj.products.vo.LoginVO;
         import mx.rpc.IResponder;
         import com.adobe.cairngorm.business.ServiceLocator;
         public class LoginDelegate {
              // anything that implements the IResponder interface can act as a responder
              private var responder:IResponder;
              private var service:Object;
              public function LoginDelegate(responder:IResponder) {
                   this.responder = responder;
                   this.service = ServiceLocator.getInstance().getRemoteObject("loginService");
              public function login(loginAttempt:LoginVO):void {
                   // Call the method of service that resides on server
                   var call:Object = service.login(loginAttempt);
                   // Send the response to responder
                   call.addResponder(responder);
    // com/myproj/products/business/Services.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <cairngorm:ServiceLocator
         xmlns:mx="http://www.adobe.com/2006/mxml"
            xmlns:cairngorm="com.adobe.cairngorm.business.*">
         <!-- Login Service -->
         <mx:RemoteObject
              id="loginService"
              destination="zend"
              source="LoginService"
              showBusyCursor="true">
              <mx:method name="doLogin" />
         </mx:RemoteObject>
    </cairngorm:ServiceLocator>
    With kind regards
    ShiVik

  • Problem setting an action command

    If I create a JButton with an icon and no text, how do I set an action command for that button?

    well i created the button and added the action
    listener inside the constructor
    JButton bOne = new JButton();
              bOne.setIcon(back);
              bOne.setActionCommand("one");
              bOne.addActionListener(this);
              add(bOne);
    then inside the actionPerformed method I have:
    String actionCommand = e.getActionCommand();
    if(actionCommand.equals("one")){
                   bOne.setIcon("c1.gif");
    and it's giving me the compiler error:
    cannot find symbol
    symbol : variable bOne
    location: class Concentration
                   bOne.setIcon("c1.gif");bOne isn't in scope. It looks to me like it's local
    to some other methodI declared it inside the constructor

  • How can I set document date automatically as system date?

    I use FBV1, FBV2, F-02, FB02. Posting date is automatically set as system date. I want to set document date automatically as system date.
    How can I set document date automaticall as system date?
    Wbr.
    İlker Çokkeçeci
    Computer Engineer
    Ankara, Turkey

    Hi Expert,
    Please refer the below link..
    Document date to be defaulted as system date for all FI transactions
    as there mentioned, please go to T-Code: SHD0.
    Regards,
    GK
    SAP

  • How to set command action for each item in the popupmenuimage

    Hi all,
    In my canvas application,i used images for popupmenu.Now i have to set command action for each item in that popupmenuimage.I dont know whether it is possible in canvas or not.Can anyone tell me the solution for this .
    Thanks,
    sourab

    Buttons is typical of a c/s application, or, in case of Web Forms, a Java applet. Instead of buttons, you have to use hyperlinks.
    See:
    http://otn.oracle.com/products/reports/htdocs/faq/faq_migration.htm#346
    The hyperlink wil have to be to a URL that does the insert in the table. This can be a mod_plsql procedure, for instance.

  • How to set document cannot save as in content Management in Portal

    Dear Sir,
    Is it possible to set document in content managment in Portal cannot "save as" in content Management in Portal, because our requirement need cannot save and save in document.
    Please advise.
    thank you and best regards,
    Vimol

    Hi,
    Content Administration -> Portal Content--> double-click the role you want to set priority to- click properties and find Sort Priority.
    Refer this link, it will explain you...
    http://help.sap.com/saphelp_nw04s/helpdata/en/92/3e703e632c7937e10000000a114084/frameset.htm
    Regards,
    Senthil K.

  • Excel MySQL - To set the action attribute in a  form

    Hi All
    I am working on an application that requires to read data from Excel and update the table in MySQL. My java code works well and does the required. For the user to select an excel file, i have designed a form using JSP. This JSP form gets loaded through Tomcat..When the user browses and selects the required file, he then will click on the update button and the java code then should be executed.
    How can i set the action attribute in form tag to execute java code.
    Following is my code.
    <%@page
    language="java"
    import="javax.servlet.*,javax.servlet.http.*,java.io.*,java.util.*,java.sql.*"
    info="BulkUpdate"
    session="true"
    %>
    <html>
    <head></head>
    <title>Bulk Update Page</title>
    <body bgcolor="#FFcc00">
    <p style="margin-top: 0; margin-bottom: 0">
    <u><b><font color="#800000" size="4"><center>Update Data from Excel Sheet to Database</center></font></b></u></p><br>
    <p style="margin-top: 0; margin-bottom: 0">
    <font face="arial" color="#000080" align="left"><b>Bulk Update on :</b>
    <%
    java.util.Date date = new java.util.Date();
    %></font>
    <%
        out.print( date );
    %>
    <br><br>
    <b><font size="2" face="Arial" color="#000080">This page is used to Select the
    data and configuration file in the browser and update MYSQL database
    </font></b></p>
    <form action="http:\\localhost:8080\itasm\ExcelTest3.java" method="post" enctype="multipart/form-data">
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber1">
        <tr>
          <td width="34%" bgcolor="#800000"><b>
      <font face="Arial" color="#FFFF00" size="2">Select the Excel File to update </font>
          </b></td>
          <td width="53%" bgcolor="#800000">
          <p align="left"><input size="34" type="file" name="spreadsheet" /></td>
          <td width="17%" bgcolor="#800000"><input type="submit" value="Update File" /></td>
        </tr><br>
    <tr>
    <td width="34%" bgcolor="#800000"><b>
    <font face="Arial" color="#FFFF00" size="2">Select the corresponding Configuration File</td>
    <td width="17%" bgcolor="#800000"><input size="34" type="file" name="configfile" /></td>
    <td width="53%" bgcolor="#800000"></td>
    </tr></font>
      </table>
    </form>
    <p style="margin-top: 0; margin-bottom: 0">
    </p>
    </body>
    </html>When i execute the above code rather than executing the code, it just displays it in the browser.
    Please help.
    Regards

    Hi Andy!
    I just started to set the tabindex on each item... it wasn't working.. I copied the example you gave.. ha.. you had taxindex --- TAX and I too didn't notice it.. so just want to mention it incase anyone does what I did.. copies without thinking..
    As you said in the previous post it is TABINDEX="n"
    Ha.. its a Monday.. Bill

  • Livecycle connector for sharepoint Set Document Content for Office documents

    Hi,
    I'm trying to figure out how the LiveCycle 9.5 connector for sharepoint works. It all works like a charm, exept for the set document content activity in a LiveCycle process.
    When I have a file named  test.txt on my Sharepoint server, and I execute the process with the "set document content" activity to replace the content with the content of the same test.txt files' content which I changed for the experiment, it gets updated without any problems.
    Yet, when I have a file named  test.docx on my Sharepoint server, and I try to replace the content with that of the content of the same test.docx file with altered content, the document content doesn't get updated to the new content.
    Is there a certain configuration that I need to do, to make this work or is this a known issue of the connector?
    Thanks in advance for your answer
    Kind Regards,
    Ronald Kamp
    Junior Flex/Java/LiveCycle Consultant at iDA MediaFoundry.

    Hi Ronald,
    I could not get this reproduced at my end. We were successfully able to replace contents of a .docx file as well.
    Can you please attach the livecycle process along with the thread in case issue has not yet been resolved at your side?
    Thanks
    Raghu

Maybe you are looking for