How can I count only text fields that have been used?

Hi,
I'm using Livecycle Designer for a dynamic form.  I have a section of the form that contains field for the user to enter goals and then rate the goal.  I'd like to count only the text fields with entries and then have the total number of rates divided by the number of text field entries.
Row 1 , column 1 -- Goal is to pick up 5 apples.   Row 1, column 2 - the rate given is 5
Row 2, column 1 - Goal is to pick up 5 pears.  Row 1, column 2 - the rate given is 5
Two goals for a total rating of 10     ---  10 divided by 2 = 5
Is it possible to count only those fields that are populated?
Also, is it possible to create an error message if the user entered 5 goals but only rated 4 of them?

You could do a simple check for null and increase a counting variable if there's a value in the field. Here's a sample:
var goalCount = 0;
if (field1.rawValue != null){
     goalCount = goalCount + 1;
if (field2.rawValue != null){
     goalCount = goalCount + 1;
if (field3.rawValue... etc.
this.rawValue = totalPoints/goalCount;
where totalPoints is a sum of the values in the goal fields. This script is javascript and should be placed in the calculate event of the field showing your average score.

Similar Messages

  • I paid for exportpdf and everytime i try to use tool on pdf, it asks me to subscribe. i have to log into website EVERY time. not acceptable.  how can i export only form fields that were filled in?

    i paid for exportpdf and every time i try to use tool on pdf, it asks me to subscribe. i have to log into website EVERY time. not acceptable. Some forms can't be saved so having to log in and only use webtool to upload a saved pdf won't work.
    as well, how can i export only form fields that were filled in if I can get pdf to save to computer?

    Hi kstine,
    I can see why that would be frustrating! Have you tried selecting Stayed Signed In underneath the Adobe ID and Password boxes when you try to log in?
    What did you use to create the PDF form? If you used FormsCentral, form data is saved to your online FormsCentral account. If you have Acrobat, you can export form data as described  here: Adobe Acrobat X Pro * Manage form data files
    Best,
    Sara

  • How can i remove items from list that have been deleted when i click on them it keeps showing empty

    how can i remove items from the list that have been deleted when i click on them it keeps showing folder empty

    Actually, Reader SHOULD keep showing documents that no longer exist, I disagree. It's no big deal, and people will quickly realise why they can't open the file. They open more files, the old ones move off.
    The REASON why it should not check is that checking whether a file exists can take a long time when things aren't good. For instance if a file server goes down, or a memory card is unplugged. That in turn would mean delays opening the File menu, and I've seen some software that can sit there for several minutes. That would really give people something of which to complain...

  • How can i make only text slider? Not picture use

    Hi!
    I want to text slider. 1 group 3 items has 5 text group changing fade effects?
    Thank you?

    This should do it ...
    1. Under widgets ... place a Blank Composition widget onto your Muse page
    2. Create a normal text box (however big you want) and fill that with the required text you want shown for your 1st slide
    3. Select the 1st (small thumbnail) box underneath the slideshow ... there's 3 shown by default
    4. Click and drag the text box, you created, onto the Blank Composition widget ... you will notice the widget box will give a BLUE outline ... this is showing you that you are adding the text box to the Blank Composition widget ...
    5. Center or place your text box accordingly ... change your Font, colours, formatting, etc to the way you want it
    6. Repeat this for however many text slides you need ... but select a different thumbnail box for each slide ... to add more than the 3 boxes shown just click the little '+' sign next to the thumnail boxes
    7. Under the properties panel for the Blank Composition (you know that small Blue circle and white arrow icon?) select Fading under Transistions
    8. Preview and edit your slide show accordingly
    That should be it ... you can add most things in the compositon widgets ... I actually use the TEXT option to show testimonials ...
    cheers,
    GemBro

  • How can I best edit word documents that have been emailed to my iPad?

    I  regularly receive word documents from work, via my yahoo email account.  I have two questions really. 
    1) Can I edit word documents received via email?
    2) If this is possible, what is the best way to do this?
    Thanks in advance

    Sorry, yes. When I asked "how do I transfer it to Pages for editing?" I perhaps should have made it clear that I have purchased it. I can also create documents in it and send them as a Word document to others via email.
    Could you clarify "When you get the email, click on the Word Document to view it." The email appears in the Inbox list but does not show an attachment in the same way it does on my Mac. If I tap the email, it opens and reveals the contents including the Word document contents. At what point am I looking for an arrow - in the email list or in the opened and readable Word document?

  • I would like to know how can I delete all my contact that have been linked from yahoo and facebook? Help!!!!

    Please help me It is drivng me crazy having all these contacts

    Go to SETTINGS, then ACCOUNTS AND SYNC select facebook and uncheck sync contacts and then do the same for yahoo.
    back up contacts w/ backup assistant that is under accounts and sync.
    then go back to SETTINGS then APPLICATIONS then MANAGER APPLICATIONS then ALL select PEOPLE then clear data. this will erase your contacts so make sure you have it backed up.
    then go to SETTINGS then ACCOUNTS and SYNC then backup assistant and sync now and this should put all your contacts back on your phone without being relinked to facebook or yahoo at least i remember it being something like this when i was trying to get rid of facebook being linked to my contacts on my Tbolt.

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • How can I program the text fields in my email forum to have rounded corners

    How can I program the text fields in my email forum to have rounded off edges or corners. 
    this is the code im using.
    // insert code here// insert code here// prepare email field
    var email = sym.$("email")
    email.html("Enter your Email: ");
    inputEmail = $('<input />').attr({'type':'text', 'value':'', 'id':'email'});
    inputEmail .css ('font-size', 14);
    inputEmail .css ('width', 350);
    inputEmail .css ('background-color', '#4e4e4e');
    inputEmail .appendTo(email);
    // prepare topic field
    var topic = sym.$("topic");
    topic.html("Topic: ");
    inputTopic = $('<input />').attr({'type':'text', 'value':'', 'id':'topic'});
    inputTopic .css ('font-size', 14);
    inputTopic .css ('width', 350);
    inputTopic .css ('background-color', '#4e4e4e');
    inputTopic .appendTo(topic);
    // prepare message field
    var message = sym.$("message");
    message.html("Message: ");
    inputMessage = $('<textarea />').attr({'type':'textarea','rows':'10', 'cols': '25','value':'', 'id':'message'});
    inputMessage .css ('font-family',"Arial,Helvtica,sans-serif");
    inputMessage .css ('color',"#ffffff");
    inputMessage .css ('font-size', 14);
    inputMessage .css ('background-color', '#4e4e4e');
    inputMessage .css ('box-shadow', '#4e4e4e');
    inputMessage .css ('width', 350);
    inputMessage .css ('height', 150);
    inputMessage .appendTo(message);
    var submitBtn = sym.$("btn");
    submitBtn.html("Submit");
    submitBtn.css("text-align", "center");
    submitBtn.css("font-size",14);
    submitBtn.css("font-weight","bold");
    submitBtn.css("color","#ffffff");

    Try this: inputEmail.css ('border-radius', '25px');
    attachment
    more details

  • How can I  see only the music that is downloaded onto my ipad instead of entire Homesharing library?

    How can I  see only the music that is downloaded onto my ipad instead of entire Homesharing library?

    Turning off Home Sharing would seem the most logical step.

  • I am trying to sync music from my iTunes library on my iMac to my iPhone. I only want selected music but I'm getting unwanted songs. How can I delete those songs on my iPhone or how can I prevent these unwanted songs that have not been selected from appea

    I am trying to sync music from my iTunes library on my iMac to my iPhone. I only want selected music but I'm getting unwanted songs. How can I delete those songs on my iPhone or how can I prevent these unwanted songs that have not been selected from appearing on my iPhone? Help!

    http://support.apple.com/kb/HT1296

  • Can a workflow e-mail notif. only show fields that have changed?

    I'd like to send an e-mail to an end user whenever any field in a Solution has changed. The e-mail notification workflow for my Solution works and starts out like this:
    (PRE('<ModifiedDate>') &lt;&gt; [<ModifiedDate>]) AND...
    However, I run into max character limitation in the e-mail message body. (will look at ToChar next) What I tried to do was display the new and previous values for the fields. This worked till I reached the char limits. Even if I could key in all the lines of characters necessary for this, the mail recipient would have to carefully go through all the fields and compare them to see which one(s) has changed. This takes too much time for the end user to do.
    Is there I way (using a single workflow) to display in an e-mail only the fields that have changed? I've looked through the posts and have not yet found an answer. Thanks.
    Edited by: user11167975 on Jun 16, 2009 1:34 PM

    You can resolve this by creating One workflow for each field or a small group of fields you want to track. Only thing is the user may receive more than one email reguarding the same Solution.

  • How can i make a search field in my app using applescript?

    I am making an app and i would like to learn how can i add a search field, that will search the content of a window. BTW i am using xcode and applescript

    Like pretty much all of the Cocoa documentation you will need to convert from Objective-C, but take a look at the Search Fields documentation.

  • I have Pandora uno that I been playing every month but I don't have the iPhone where I donwload the app now I have a different phone how can I transfer to the one that I'm using now

    Ihave pandora uno that i been playing every month but I don't have the iPhone where I donwload the app now I have a different phone how can I transfer to the one that I'm using now

    Not sure if you are asking how to obtain the Pandora app on the new phone? If so, the following has information for a variety of phone types including an iPhone: http://www.pandora.com/everywhere/mobile

  • How to not allow someone to load text messages that have been deleted from the phone however apps are still able to reteive them

    Someone is trying to access the text messages that have been deleted off of my phone thru an app (unknown app)
    I do have somethings that I want to remain private in my phone and I either need help to delete them for good. Or block them

    Let me rephrase that. They can't unless they had physical possession of your phone and installed spyware on it.

  • How do i recover a text message that has been deleted

    how do i recover a text message that has been deleted

    Did you back it up first?  If so, are you willing to restore your iPhone back to the last backup?
    If you didn't back it up, it's gone.

Maybe you are looking for

  • PS CS4 crashing when brushes changed - OSX Lion

    Have just installed Photoshop CS4 on a brand new MacBook Pro supplied with Lion. PS keep crashing when brushes changed in brush selectore with following error report. Have installed Java runtime and deleted preferences file without any resolution. An

  • Passing data to subpanel

    I have an architecture question for the labview 8.2 community... I have two indicators that I'll be passing data to and I would like to create a single picture (png, jpg, ect) of both indicators. The key aspects is that the data to these indicators w

  • Request Product Service Error

    Hey all, I'm trying to send my iPod back after the internal lcd screen cracked when charging over night. :/ And now im trying to send back my iPod nano and get this error... "ALERT (26000,131) The serial number you have entered cannot be verified. Pl

  • SAP TDMS Certification

    Hi,      I would like to thank everyone for their contribution in this forums. I need a small clarification regarding the SAP Tech ED 2010 exams. I like to appear for SAP TDMS certification . I want to know whether any possibilities are their for thi

  • OTN RSS News Feed is unavailable.

    Hi. Once again the OTN RSS News Feed is down. I got a reply once yesterday but the resulting XML document was invalid. Since then requests have returned nothing. Please fix it! Cheers Tim...