How can I determine which text fields contain data?

Although it is a sad testament to my programming skills, I'm little embarrassed because I'm only doing this sort of thing maybe once every two or three years.  I am using FormCalc (mainly b/c I'm still learning Javascript and this form had already been written in FormCalc).

Here's the problem:

I have three text fields (Textfield1, Textfield2, Textfield3).

I created three variables (var1, var2, var3) and initialized to 0.

To determine how many fields containing data, I used the if/then/else statements:

If (Textfield1.rawValue == "") then

var1 = 0

on the other

var1 = 1

endif

Textfield2 and Textfield3 have similar statements (respectively using var3 and var2 variables).

To test the code, I have a message box returns the sum of var1 + var2 and var3.  With NOTHING entered into all fields of text, I expect him back a sum of 0, but it returns the sum of 3!  If I enter data in only one or two of the fields, yet once it returns a value of 3.

I tried the initialization of the value of the Textfields (Textfield1.rawValue = ""), but I always get a value of 3.

This is probably a simple programming error, but still, I'm not a developer.  Any help would be appreciated.

I think that you may need to modify your code for: (replace the "with the null value). Change of FormCalc to Javascript

If (Textfield1.rawValue == null) then

var1 = 0

on the other

var1 = 1

endif

Tags: Adobe LiveCycle

Similar Questions

  • I was looking in my information system; software environment; system drivers and I noticed that many have stopped status. How can I determine which are to be started? How can I start them?

    I was looking in my information system; software environment; system drivers and I noticed that many have stopped status.  How can I determine which are to be started?  How can I start them?

    Hello

    · Do you see a problem with your computer?

    You can check the links which has more information on the information system: Description of Windows XP system information (Msinfo32.exe) tool: http://support.microsoft.com/kb/308549

  • How can we add a text field on the stage, but without the text label?

    How can we add a text field on stage, but without the left text label by default?  I want just the field.

    I thought about it.  Go to the page layout palette and change the options of caption for the text box.

  • How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    Hi all

    How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    There is also a checkbox on the dialog box 'Sign' to lock document after signing.

  • How can I make my text field automatically upper case?

    How can I make my text field in a form automatically uppercase?

    Use the following as custom hits JavaScript text field (select a Format type custom):

    Script from typo to text field

    Event.change = event.change.toUpperCase ();

  • How can I determine what text encoding uses a database?

    Hello

    How can I determine the text in multibyte encoding (UTF8, UTF16, etc) who uses a database? I guess I can query a system table, but I was not able to determine that.

    Thank you.

    Bob
    SQL> select * from nls_database_parameters where parameter like '%SET%';
    
    PARAMETER                      VALUE
    ------------------------------ ----------------------------------------
    NLS_CHARACTERSET               WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET         AL16UTF16
    
  • How can I determine which had launched a particular service?

    Hello guys:
    I was checking the services of Windows 7 and saw that just the computer turns and there are services began.
    Obviously, if the service is set to automatic start, this behavior is expected. But if it is set to start manual (on request), should be a service or application that has begun. Sometimes, which could explain the dependencies, more precisely in the box that says: "the following system components depend on this service. But what happens if this box is empty.
    My question is, how do I determine the service or the responsible application to launch a service to manual start?
    Best regards.

    How can I determine the service or the responsible application to launch a service to manual start?


    One obvious answer is to disable and observed effect. However, I am usually warning against changing services default start settings, because it tends to cause system error. Users often do to improve the performance of the system, but it will normally do for negligible improvement and often be likely to result in a decrease in system performance.

  • How can I add a text field for the main menu?

    I have a project with a menu.  He has a title.  I wanted to add an additional track on the menu, what I had done in an earlier draft.  I would have thought he would have intuitively obvious, as highlighting the existing title I and do a copy and paste.  However, I learned that nothing is intuitive with Premiere elements 12.  Can someone tell me how to get a 2nd title on my main menu?  I have done it before, but apparently did not write it and I was faced with that I falsely assumed would take me 30 seconds to accomplish.  Thank you.

    Rick

    Do you really need a second title for the page in the main menu and the selection of scene or you page fixed for your Adobe title in more than one line?

    I wonder

    I wanted to add an additional track on the menu, what I had done in an earlier draft.

    Is it possible that as soon as you use a theme which came with 'subtitle', as the trip/Beach Resort, not all do.

    Workaround for the title with more than one line of text can backfire on you. But you can try. Excerpt from my first items 13 on this blog

    0019 first Elements 13 movie Menu title question: multiple lines of text


    A first elements 13/13.1 user reports that, if it creates a 3 lines of title text for the main menu of the fake big screen theme in the customization area of Movie Maker project, these 3 lines of text eventually "encoded" in the project of reopening after that that there had been closed.

    We have confirmed this report and extended it to include this problem appears for 13 of Menus other than the fake Widescreen cinema. This issue is not seen in first items 12/12.1 and earlier versions.

    BEFORE REOPENING THE CLOSE SAVE

    Figure 1. Main menu of Spring Flower home with 3 lines of text, as seen before the closure of the Reopen

    AFTER THE REOPENED NARROW SAVE


    Figure 2. Spring Flower main Menu title initially with 3 lines of text, as seen from the closure of the Reopen



    The only way found so far to get the final product to have 3 lines of title text for menus in the final product is to customize the theme to the movie Menu in the customization of the Menu movie of the project area, do not save, close the project at this time and can do the burn to.


    Many variables were examined to explain this behavior. So far, no answer for why.

    If you are determined to use a particular theme that comes with the title menu and subtitle, look at the text of the Palette layers layers in the editing menu .psd file (.psd Editor could be Photoshop CS or higher).

    Regarding

    on my project last year that was the menu that I liked with 2 text fields, I have also got rid of the "arrow" shortly before the text that was the menu key.  Anyone know how I do that?  I can't figure that out now.

    Could you be more specific. But, for now, consider... If you Play All text, you double-click to open the text of the amendment, the deleted text, click OK. Play All disappeared. Sometimes, in page and removal of text "main menu" scene selection to the navigation button... double click on the button to open the changes to the text, delete text, press ENTER, and then bar spacing, and click OK.

    Please let us know if everything above the target you wanted to know.

    Thank you.

    RTA

  • How can I determine which applications and processes are turned on at first upward and how can I keep their autostart?

    My office of gateway using Windows XP takes a long time to start.  I hear a lot of activity because it starts and after a very long time, I can really use it.  I would like to know what process or applications start automatically and then determine which ones to move away and how.

    If you were to Google something like:

    XP boot manager

    You will get hits with links to managers of free starter like this simple:

    http://www.MLIN.NET/StartupCPL.shtml

    Another popular and free tool with a built-in startup manager (and other interesting things) are CCleaner which you can download here:
    http://www.Piriform.com/CCleaner

    CCleaner allows you to manage most of the startup items and also do some other operations oriented cleaning.  Some people will you recommend is not to use the registry functions in CCleaner to avoid these features for now.  I have no problem with it for me, but sometimes it's a contentious issue, I prefer to avoid as much as possible!

    You can uninstall CCleaner later if you don't like it.

    You can disable the startup items, see how things look and if you want - you just delete them (or leave it off).

    After launch of CCleaner and see what startup items you can disable/remove, if you are still not sure of your startup items, follow these steps:

    Run CCleaner and choose Tools, boot and bottom right, click on the button "Save to text file" to save the startup information in a text - something like startup.txt file

    Save the boot information text file on your desktop (or somewhere you can find it) open the text file with an editor (Notepad or WordPad), select all (Ctrl-A), copy text, all the text selected in the Windows Clipboard (Ctrl-C) and then paste (Ctrl + V) the contents of the startup list to come back here in your next reply and maybe someone can tell you another thing to consider.

    A more revealing startup Analyzer is Autoruns which will allow the manipulation of all sectors of boot and does not actually install anything:
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx

    I have zero startup items on my computer, so none of this is important to me!

  • How can I add javascript text fields to Acrobat since Applescript pages please?

    I have a real need to add text fields to the pages of the document Acrobat of Applescript. I can't access the headers and footers of Applescript in Acrobat XI. I can set watermarks using the following script, but can't for the life of knitting me a way to add text fields. Advice please?

    Concerning

    the value TempAttachmentName to "(20140717121212Z).

    the value PreserveFileName to "This is a test."

    the value work around to fake

    say application "Adobe Acrobat Pro.

    Activate

    the value CountOfPages to County of pages

    Repeat with PageCounter of 1 to CountOfPages

    say application 'System events' to say process "AdobeAcrobat.

    try

    click on menu item "Page...". " of menu 1 to menu item " go to " to menu 1 to menu bar item "display" of the menu bar 1

    tell request current of delay 0.1

    hit PageCounter as text

    tell request current of delay 0.1

    frappe retour

    if not work around then

    my ADDHeaderFooter() TempAttachmentName PreserveFileName & "" & CountOfPages PageCounter( )

    end if

    end try

    end say

    end Repeat

    end say

    on ADDHeaderFooter() The_String1 The_String2, , currentPage( )

    say application "Adobe Acrobat Pro.

    Activate

    the value myDocument to document 1

    tell myDocument

    tell page currentPage

    the value CBOX to culture box

    the value point 2 of the cbox to (article 2 of the cbox) + 44

    the value point 4 of the cbox to (article 4 from the cbox)-44

    the value media box to CBOX

    the value culture box to CBOX

    the value theResult1 to my Add_WaterMarkText (The_String1, "IDAutomationHC39M", 12, 1, 1, 1, 0, 3, 10, 3, 0)

    script theResult1

    the value theResult2 to my Add_WaterMarkText (The_String2, 'Times', 16, 1, 1, 1, 0, 4, 10, -6, 0)

    script theResult2

    end say

    end say

    end say

    end ADDHeaderFooter

    on Add_WaterMarkText() cText cFont nFontSize LV don't, nTA nHA ANV nHV nVV nR( )

    the value Params to "cText: '" & cText "", "& return

    the value Params to Params & "cFont: '" & cFont "", "& return

    the value Params to Params & "nFontSize: '" & nFontSize & "", "& return

    if class of nS is integer then the value Params to Params & "start:" & (nS - 1) & "," & back

    if class of nE is integer then the value Params to Params & "nEnd:" & (not - 1) & "," & back

    -0 = left, 1 = Central, 2 = right

    if class of nHA is integer then the value Params to Params & "nHorizAlign:" & nHA & ', ' & return

    --3 = top, 4 = down

    if class of nVA is integer then the value Params to Params & "nVertAlign:" & nVA & ', ' & return

    -offset in points

    if class of nHV is integer then the value Params to Params & "nHorizValue:" & nHV & ', ' & return

    -offset in points

    if class of nVV is integer then the value Params to Params & "nVertValue:" & nVV & ', ' & return

    if class of nR is integer then the value Params to Params & "nRotation:" & "," & nR & return

    the value JavaScript to "this.addWatermarkFromText ({" & Params & "});

    return to javascript

    end Add_WaterMarkText

    As a developer, you need that document. It is part of the Acrobat SDK kit, which is free to download. You can't learn Acrobat programming with google!

  • How can I restrict a text field in a single alphanumeric character?

    I have a series of text boxes when a user enters a series of characters.

    How can I limit each field so that it accepts a single alphanumeric character?

    Steve

    Then the tab of the field properties dialog box Format, select a format special cyategory > arbitrary mask and enter the field that appears beneath a single capital "O". Optionally, set the limit of characters for 1 on the Options tab, so that the user does not receive the error message when you try to type more characters.

  • How can I determine which item in a table was just clicked on?

    I have a table set in place on my front. When user right click on an item in this table, I would like to be able choose among 3 different options. I have the shortcut menu works, but I need to know what element of the array of the user in a click with the right button to determine what values to change. How can I get the index of the item?

    Thanks for any help!

    https://decibel.NI.com/content/docs/doc-6406

  • How can I set a text field to convert all text entered in uppercase when filled?

    I want to have any text you entered filled in specific text fields to automatically convert uppercase. I am working in LiveCycle Designer ES2.

    I don't know how to put the code to make it work. Cannot make it work.

  • How can I make my text field accepts only alphabets?

    It would really help that anyone here help me with a text field where I can enter only alphabets, nothing else. I'm using Acrobat 9 Pro.

    Here is a function at the level of the document that can be called from the event of typing in a text field that will limit the entry of characters A - Z and a - z:

    // Document-level function
    function alphaOnlyKS() {
    
        // Get all that is currently in the field
        var val = AFMergeChange(event);
    
        // Reject entry if anything but digits
        event.rc = AFExactMatch(/[A-z]*/, val);
    }
    

    Call it like that since the event in the sequence of keys:

    // Custom Keystroke script for text field
    alphaOnlyKS();
    

    If you get stuck or you need a wider range of characters, post again.

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

    Hello

    I use Livecycle Designer to a dynamic form.  I have a section of the form that contains the field for the user to enter the goals, and then note the purpose.  I want to count only the text fields with entries and have the total number of rates, divided by the number of entries in text field.

    Line 1, column 1 - goal is to collect 5 apples.   Line 1, column 2 - the given rate is 5

    Row 2, column 1 - goal is to collect 5 pears.  Line 1, column 2 - the given rate is 5

    Two goals for a total power of 10-10 divided by 2 = 5

    Is it possible to count only the fields that are populated?

    Also, is it possible to create an error message if the user scored 5 goals but rated only 4 of them?

    Please send me the form to

    [email protected]. I'll get it repaired for you and send it back and then you'll have the code in the form of sample for later reference.

Maybe you are looking for

  • Playlists do not sync for iPhone 6plus

    I barely noticed, so do not know if the update iOS triggered 9.3.4 it but if I add a new playlist on iTunes is not sync to my iPhone more. Did a few playlists on the PC test. They sync on my iPad but not on the iPhone - tried restarting the iPhone, b

  • Application selection

    Firefox is showing applications unmatched PDF files . In openwith > other applications, it opens a browser directory but (Linux) applications is not available. This has happened Don't know how many times == If started goes on forever...

  • Display driver has stopped working and has recovered

    This is my first post, so please bear with me. Also although I use pc a lot, I'm not technical interest. I have a laptop Compaq presario CQ61 64-bit Windows 7.  2 days ago the screen went suddenly "speckly" flickered then briefly became black. On for

  • El Capitan installation - error message

    I have tried 3 times now to install El capitan, and it failed. I download on the App store, and then once it is downloaded it ask if I want to install, and I say Yes. It takes about a minute to activate the installation. Then, once that is complete t

  • How can I make the biggest user account icons, they are too small?

    I can barely see the names in the user accounts on the computer. Can I enlarge the icons? It is the screen that appears when you turn on the computer.