Function in a rawValue

The below script allows me to place a date from mm-dd-yyyy format e.g. 05-17-2004 into Month Day, Year format, e.g. May 17, 2004. I used a Script Object function to convert the date. However how do I run the function inside the textfield.rawValue =  without the script giving me an "undefined".
//Letter References Content
form1.Textfield.rawValue = "(a) Your previous Letter, RA-XX dated " + SOdateConverter.fxdateconverter(form1.Submissiondate.rawValue,LONGDATE) + LONGDATE.value + "\n\n" + "(b) GPA LOA " + form1.loaTrackingnumber.rawValue + ", GPA Letter Number 10B-XX dated " + SOdateConverter.fxdateconverter(form1.loaDate.rawValue,LONGDATE) + LONGDATE.value + ".";
Better said this script outputs the folloowing
(a) Letter RA-XX-XXXX dated undefinedApril19, 2010
(b) GPA LOA N129EDPO, GPA Letter Number 104B-XX-XXXX dated undefinedMay 22, 2010
I want to remove the undefineds. I tried placing the function in brackets
{SOdateConverter.fxdateconverter(form1.Submissiondate.rawValue,LONGDATE)}
did not work.
Any ideas?

Any chance you can post a link to the form (letter) using something like dropbox or acrobat.com - I'd be happy to solve it for you.
cheers
techtaketwo

Similar Messages

  • Getting variables out of a function

    Hi,
    In order to reduce the use of the calculation event in a repeating subform, I have set up a function (riskRating) in a script object (calculateRisk), which the exit event of a dropdown (RA_severity) calls.
    //This is the Javascript in the exit event...
    var vLikelihood = RA_likelihood.rawValue; //dropdown list 1
    var vSeverity = RA_severity.rawValue; //dropdown list 2
    var vRisk;
    calculateRisk.riskRating(vLikelihood, vSeverity);
    console.println("Risk after function = " + vRisk);
    RA_risk_rating.rawValue = vRisk;  //this line is meant to assign the value of vRisk from the function to another field (but it doesn't)
    //This is the function within calculateRisk script object...
    function riskRating(vLikelihood, vSeverity)
        var vRisk;
        if (vLikelihood == null && vSeverity == null)
            vRisk = null;
        else
            vRisk = vLikelihood * vSeverity;
        console.println("Risk inside function = " + vRisk);
        return vRisk;
    I have tried various approaches to get the answer back out of the function and to be used for the remainder of the script in the exit event script.
    The console show the correct calculation in the function, but it is not updating the variable outside of the function.
    Any ideas?
    Thanks,
    Niall

    Niall,
    Take a look at the attached. The form contains four numeric fields: 'a', 'b', 'total', and 'other'. It does a calculate on fields 'a' and 'b'. On the exit event of 'b' it calls 'addNumbers()' in 'MyScriptObject'. The function updates 'total' and returns the value of 'total' to be bound to 'other'.
    // form1.page1.subform1.b::exit - (JavaScript, client)
    other.rawValue = MyScriptObject.addNumbers(a,b,total);
    // form1.#variables[0].MyScriptObject - (JavaScript, client)
    function addNumbers(a_,b_,total_) {
        return(total_.rawValue = a_.rawValue + b_.rawValue);
    Is that what you are looking for?
    Steve

  • Why certain functionality works in Adobe Acrobat, but not in LiveCycle Preview PDF?

    I have some simple logic in a LiveCycle form that will hide a subform when I click a checkbox.  When I save as dynamic PDF and open in Adobe Acrobat 9, it works fine, but when I test the .xdp in LiveCycle Preview PDF it does not.  I'm new to JavaScript and have wasted some time troubleshooting what I thought was a problem, only to find out it was working.  Am I doing something that is not capatible with Preview PDF? 
    Attached below are images of hierarchy, design, and code.  I realize the hierarchy is more complex than it needs to be.  It is an excerpt I built to test this functionality, based on the full document.
    Thanks.
    form1.diag.Cervical.show::click - (JavaScript, client)
    if (this.rawValue == 1) {narrative.Cervical.mre.presence = "visible"} else {narrative.Cervical.mre.presence = "hidden"}
    form1.narrative.Cervical.mre::initialize - (JavaScript, client)
    this.presence = "hidden";

    Did you made the form as Dynamic and Interactive in the preview..
         1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form
         2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form
         3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".
    Thanks
    Srini

  • How to get an Adobe trusted function javascript to save a pdf form even if fields are empty?

    I have a form I have created in Livecycle designer which I want to save to a specific location using a combination of specific fields in the form. I have been able to do this by writing a trusted function and putting it in the adobe javascript file and then putting some code on a save button in the form. However, it may be that some of the fields (vfirstname and vsecondname) may be blank and i still want the form to save. Ideally i want to write an if statement to substitute those fields for other fields if they are blank but cant get the code to  work.
    Working code in trusted function file
    // SaveAs Function1 var mySaveDoc = app.trustedFunction(function(doc) { app.beginPriv(); var vDate1 = event.target.xfa.resolveNode("form1.page1.Table1.Row1.leftsideofform.Timeanddate.Dateofca ll").rawValue.toString(); var vfirstname = event.target.xfa.resolveNode(" form1.page1.Table1.Row1.rightsideofform.Prospectiveclient.ClientFirstname").rawValue.toSt ring(); var vsecondname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient.C lientsurname").rawValue.toString(); var myPath = "/MGLCC01-SV/MGPdata/Mihomecare/testce/" + vDate1 +"_" + vfirstname + "-" + vsecondname + ".pdf"; // saveAs is the only privileged code that needs to be enclosed doc.saveAs({cPath: myPath, bCopy: true, bPromptToOverwrite: true}); app.endPriv(); }); 
    Working code on save button in form
    form1.#pageSet[0].Newenquirymasterpage.Button1::mouseUp - (JavaScript, client) var txt = form1.execValidate(); //This script will validate all required fields event.target.mySaveDoc(event.target) xfa.host.messageBox("Document has been saved to shared drive", "File Saved", 3, 1); 
    IF code for trusted function file that I cant get to work
    // SaveAs Function1 var mySaveDoc = app.trustedFunction(function(doc) { app.beginPriv(); var vDate1 = event.target.xfa.resolveNode("form1.page1.Table1.Row1.leftsideofform.Timeanddate.Dateofca ll").rawValue.toString(); if (event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient. ClientFirstname").rawValue == " ")      {          var vfirstname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Enquirer.EnquFirstn ame").rawValue.toString();      }      else      {          var vfirstname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient.C lientFirstname").rawValue.toString();      }     if (event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient. Clientsurname").rawValue == " ")      {          var vsecondname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Enquirer.Enqsurname ").rawValue.toString();      }      else      {          var vsecondname = event.target.xfa.resolveNode("form1.page1.Table1.Row1.rightsideofform.Prospectiveclient.C lientsurname").rawValue.toString();      } var myPath = "/MGLCC01-SV/MGPdata/Mihomecare/testce/" + vDate1 +"_" + vfirstname + "-" + vsecondname + ".pdf"; // saveAs is the only privileged code that needs to be enclosed doc.saveAs({cPath: myPath, bCopy: true, bPromptToOverwrite: true}); app.endPriv(); }); 
    Can anyone suggest why the If code above doesn't work? or how i could get the form to submit even if the fields are blank?

    It can also work if you certify the document and each user chooses to trust it to execute privileged JavaScript, which may be feasible in this setting. The method you'd use is doc.saveAs: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.524.html
    Also, read the following tutorial: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

  • Javascript function not working in LiveCycle

    I've just completed importing an existing acrobat form into LiveCycle for editing.  During the import process, I received this LiveCycle warning:
    The form includes a simple JavaScript Function that looks really good, but probably doesn't reference the correct objects in the form. Here's the Code:
    topmostSubform.Page1.Text1::calculate - (JavaScript, client)
    (function() {
    var v1 = Number(this.getField ("MinutesRow1").value);
    var v2 = Number(this.getField ("MinutesRow2").value);
    var v3 = Number(this.getField ("MinutesRow3").value);
    var v4 = Number(this.getField ("MinutesRow4").value);
    var v5 = Number(this.getField ("MinutesRow5").value);
    var v6 = Number(this.getField ("MinutesRow6").value);
    var v7 = Number(this.getField ("MinutesRow7").value);
    var v8 = Number(this.getField ("MinutesRow8").value);
    var v9 = Number(this.getField ("MinutesRow9").value);
    var v10 = Number(this.getField ("MinutesRow10").value);
    var v11 = Number(this.getField ("MinutesRow11").value);
    var v12 = Number(this.getField ("MinutesRow12").value);
    var v13 = Number(this.getField ("MinutesRow13").value);
    var v14 = Number(this.getField ("MinutesRow14").value);
    var v15 = Number(this.getField ("MinutesRow15").value);
        //perform the calculation
        var result = (v1+v2+v3+v4+v5+v6+v7+v8+v9+v10+v11+v12+v13+v14+v15)/60;
        //set the value of this field to the result
        event.value = result;
    The object references seem to be correct, and the code seems solid. Does anyone have any ideas?

    Hi.
    AcroForms (forms created in Acrobat) use a version of JavaScript that is close to Code JavaScript. So syntax like this.getField are specific to AcroForms.
    XFA Forms (forms created in LiveCycle Designer) are completely different. The version of JavaScript has subtle but important differences.
    For example, "this" in AcroForms means the document, whereas in XFA Forms, "this" refers to the object that contains the script.
    Have a look here at an example that explains how to reference objects in LC Designer: http://assure.ly/kUP02y.
    So for example:
    function myFunction () {
    var v1 = MinutesRow1.rawValue;
    // the rest of the variables
    var myResult = (v1+v2+v3+v4+v5+v6+v7+v8+v9+v10+v11+v12+v13+v14+v15)/60;
    return myResult;
    Good luck,
    Niall

  • Function call from button works then vanishes if I click anywhere

    I have the following code and it works great some times but others nothing happens, the button seems to work then for no apparent reason (at least nothing that comes up in the javascript console) I click and it says "FundName.FundTitle.getFundTitle is not a function" but it worked several times before that and nothing changed. Feel like I'm losing my mind, please give me some insight if you have any, everything is set to export for acrobat 9 and I have reader nine installed.
    DeedEstablishmentForm.Page1.Button2::click - (JavaScript, client)
    var str = FundName.FundTitle.getFundTitle();
    I have a fragment that has the following:
    form1.FundName.FundTitle::initialize - (JavaScript, client)
    function getFundTitle(){
    this.str = new String(this.rawValue);
    this.start = str.length - 20;
    this.idx = str.toLowerCase().lastIndexOf('superannuation fund');
    xfa.host.messageBox(this.str.valueOf());
    xfa.host.messageBox(this.start.toString());
    xfa.host.messageBox(this.idx.toString());
    if(this.start >= 1 && this.idx >= this.start && this.idx >= 1){
    return this.str.slice(0,idx);
    }else{
    return this.str;

    I talked to the developers about this one and I think we figured out what is happening. It has to do with the scope of the function. Here is what we believe is happening. You have defined your function on the Initialize event of an object. The function gets created and at the end of the Initialize event script it is no longer needed so it is marked for deletion. The function is still around until the next garbage collection cycle. Now the form finishes loading and you hit the button to call the function. Because th efunction still exists it is called. You continue to do this and all is OK. At some point garbage collection will run and the function will be deleted. It is at that point that you call it again and get the error. To resolve this problem you need to ensure that the funstion is always available. If you move your function to a script object then when the form loads the script object will run and your function will be created. Now it is callable at all times and shoudl alleviate th eissue you are having.
    On another note I noticed the use of the "this" key word in your script. In our world the "this" object is the obejct that has focus (or who is making the call). The ability to extend the "this" object as you do with str, start and idx is going to disappear. The "this" object will become immutable in a future release. To ensure that you do not have issues in a future release I suggest you change the way you do that code.
    Lastly by moving the code to a script object you will not be able to use "this". You can pass an object to the script and use that instead.
    Hope that helps. Let me know if you need further explanation.
    Paul

  • Using an array with a function

    Hi all,
    I'm working on an order form where users choose a course they want to order from a drop-down list, then enter the number of licences they require. I'm trying to build in a 'volume-based' discount model the form, and would like to ask for some help in using arrays and how to use them in functions. I'm very new to this, and would appreciate any help you can provide!
    Basically, we have 3 products that can be ordered on the same form, and all have different discount models (i.e you get a different % discount for different numbers of licences ordered, depending on the course chosen). I'm storing the discount models in 3 separate two-dimensional arrays, then want to create a function that takes two parameters - the name of the array and the volume that the customer orders - to calculate the appropriate discount. I would then call the function on the change events of either the drop down list or the licence qty field.
    Below is my attempt so far (only one array here, but the others are the same syntax). This is held in a script object called DiscountCalculator in the form. The idea of the function is to loop through the array until it finds the correct course, then loop through the value field until it finds the correct discount:
    //code holds the discount model for each course in a 2 dimensional array. A new array is needed for each course.
    //Course 1
    var
    Course1Array = new Array(3);
    Course1Array[0]
    = new Array(2);Course1Array[0][0]
    = "49";  //'breakpoint' at which discount is appliedCourse1Array[0][1]
    = "0";   //discount % given for this no of licences
    Course1Array[1]
    = new Array(2);Course1Array[1][0]
    = "99";Course1Array[1][1]
    = "20";
    Course1Array[2]
    = new Array(2);Course1Array[2][0]
    = "199";Course1Array[2][1]
    = "25";
    function
    CalculateDiscount(CourseArray, value){
    for
    (var i = 0; i <= CourseArray.length; i++){
    if
    (value <= CourseArray[i][0]){
    return CourseArray[i][1]}
    I can use a MessageBox to return a specified value from the array on the click event, so that seems to be set up correctly. But when I try to tcall the function in the change event of the drop-down list on the form:
    DiscountCalculator.CalculateDiscount(fldCourse.rawvalue, fldqty.rawvalue)
    It doesn't work, usually complaining that "Course1Array is not defined". I think it must be some kind of syntax error, but I have trawled the internet looking for some examples and can't find any.
    I'd be grateful for any assistance.
    Thanks
    Matt

    It might be easy to solve these issues if you post your form.
    Post your form if it doesn't contain any confidential information.
    Nith

  • Function call in FormCalc

    I am trying to call a function (type4) from within a FormCalc exit event:
    if ($.rawValue <> "2") then
         type4.validate()
    endif
    But when I run the form, I get an error saying that the "script does not have a method 'validate'."
    My function definitely does have a method called 'validate', see below:
    function validate() {
    Can anyone help me identify what I'm doing wrong? Thanks for your help.
    --Bruce

    Hi,
    I beleive validate() is a reserved method, so you should rename your function into validateObj() or so.
    And when calling a function, the syntax looks like:
    if ($.rawValue <> "2") then
         validateObj()
    endif
    In contrast to JavaScript FormCalc can only call functions which have been declared before the function call.
    Just an example.
    This script works, because the function is declared before it's called.
    func alert(msg) do
              $host.messageBox(msg)
    endfunc
    if ($ < 2) then
              alert("value to small")
    else
              alert("value ok")
    endif
    but this script fails, because the function call points to a function which has not be declared yet.
    if ($ < 2) then
              alert("value to small")
    else
              alert("value ok")
    endif
    func alert(msg) do
      $host.messageBox(msg)
    endfunc

  • Getting result of stored functions in UCM components

    Hi,
    I have to create UCM component that executes function stored in DB and somehow "inject" it's return value to iDoc.
    How can I get return value of DB stored function?
    I managed to run the function, but I can not get it's return value.
    The only documentation I found is inside "documentation" folder from HowToComponents bundle, but there is no even javadoc for executeCallable that returns CallableResults.
    The queries I used are:
    { ? = call package.func(?) }
    or
    BEGIN ? := package.func(?); END;
    I added 2 parameters to these queries ( in queries html file)
    In both cases the function gets executed (I see changes in DB)
    after the execution I try to getInteger("param1_name") on returned CallableResults and recieve NullPointerException:
    Runtime error: java.lang.NullPointerException
    at oracle.jdbc.driver.OracleCallableStatement.getInt(OracleCallableStatement.java:1119)
    at intradoc.jdbc.JdbcCallableResults.getData(JdbcCallableResults.java:203)
    at intradoc.jdbc.JdbcCallableResults.getInteger(JdbcCallableResults.java:98)
    at DatabaseProvider.DatabaseProviderHandler.executeReservation(DatabaseProviderHandler.java:224) <------ calling getInteger("param1_name")
    the param1_name is not changed in iDoc.
    Thanks.
    Edited by: dpd on Jan 13, 2010 8:24 AM

    Hi,
    you can do this with just one script object.
    For example the "MyTexts" script object with the string variables and a function to return the values.
    var infotext1 = "Lorem ipsum dolor sit amet"
    var infotext2 = "Non eram nescius Brute cum"
    function getText(FieldNumber) {
              return eval("infotext" + FieldNumber);
    To populate a field you can call the function in the script object with an argument, which is the alias for the varaible number you want to return.
    You don't need to enter the full somExpression to your script object, the name is enough.
    Textfeld1.rawValue = MyTexts.getText(1);

  • Turn a case statement into a function

    I have a case statement (from an earlier post - thank you) that works. I was wondering if it could be edited and change into a function instead. I think it would be cleaner. The variable is set in the Form Properties (pCounterA).
    switch (pCounterA.value)
        case "1":
        profileA__1image.rawValue = profileA_1image.value.image.value;
        pCounterA.value = "2";
        break;
        case "2":
        profileA__1image.rawValue = profileA_2image.value.image.value;
        pCounterA.value = "3";
        break;
        case "3":
        profileA__1image.rawValue = profileA_3image.value.image.value;
        pCounterA.value = "4";
        break;
        case "4":
        profileA__1image.rawValue = profileA_4image.value.image.value;
        pCounterA.value = "5";
        break;
        case "5":
        profileA__1image.rawValue = profileA_5image.value.image.value;
        pCounterA.value = "1"; // loops back to the first image
        break;

    Hi,
    If you insert a script object by right clicking on the root container (often "form1"). It will appear unnamed in the root / variables in the hierarchy.
    First of all you should name the script object, staying away from reserved names, eg "this". Say "myScripts"
    Script objects can only contain Javascript, so you would need to convert FormCalc scripts (not an issue in your case).
    When you go into the script object, you start off a function with "function" followed by its name and inputs in brackets. The extent of the function is given by curly brackets:
    function changeImage(vCounter)
         switch (vCounter)
             case "1":
             profileA__1image.rawValue = profileA_1image.value.image.value;
             pCounterA.value = "2";
             break;
         } // close switch statement
    } // close function
    Back in the form you can call the function by referencing the name of the script object and the name of the function.
    myScripts.changeImage(pCounterA.value);
    A couple of things to note:
    The input in the script can refer to an objects value or a global variable, but in the function you can assign it s different name. So above the input pCounterA.value is EQUAL to vCounter in the function;
    You can have several inputs in the call for the function separated by commas;
    Don't have the same name for the script object AND the function
    Hope that helps,
    Niall

  • How to make hidden Drop Lists functional in RBList Subforms?

    I have created a form that contains 3 isolated Radio Button lists, each with hidden subforms that are unique per each button.
    Two of my RBLists and subforms work perfectly, showing hidden Drop Down List options and other fields as they should when a button is selected.
    However, RBList3 presents the Drop Down lists as user entry fields only. Each hidden subform in RBList3 contains one drop down menu and one text box for instructions.
    I've used the same javascript to hide/show hidden fields when buttons are selected. All settings seem to match up. Here is a sample of my code:
    if(RBList3.F.rawValue != 2) 
        this.presence = "hidden";
        newsubform.presence = "hidden";
    else if(RBList3.F.rawValue == 2)
        this.presence = "visible";
        newsubform.presence = "hidden";
    Does anyone have any suggestions for how to make my Drop Down Lists in RBList3 show as functional Drop lists?
    I have attached the form for reference.

    See example #62 on my blog for a 10.1.3 example:
    http://tinyurl.com/smuench-adf-examples
    For a tutorial on how to create them using the new features we enable in 11g, see my Oracle Magazine article:
    Defining Cascading List of Values

  • Invalid property get operation; subform doesn't have property 'rawValue'

    Hello,
    I have a form where on the Submit button I'm putting JavaScript that checks each field and radio button set to ensure the user has filled something in. I have used this script before successfully, but this time it is not working and for the life of me I can't see what wrong. Also, I've not encountered this particular error message before. Here is the text I am seeing on clicking the Submit button:
    Acrobat JavaScript Debugger Functions Version 11.0
    Acrobat EScript Built-in Functions Version 11.0
    Acrobat SOAP 11.0
    Exception in line 5 of function top_level, script XFA:form1[0]:page2[0]:buttons[0]:Button1[0]:click
    GeneralError: Operation failed.
    XFAObject.rawValue:5:XFA:form1[0]:page2[0]:buttons[0]:Button1[0]:click
    Invalid property get operation; subform doesn't have property 'rawValue'
    I'm glad to share my script if that's helpful as well.
    Thanks in advance for your help,
    MDawn.

    Here's the script:
    var v1 = page1.firstPage.positioned.firstLine.reqType.rawValue;
    var v2 = page1.firstPage.positioned.firstLine.orderQuote.rawValue;
    var v3 = page1.firstPage.positioned.description.rawValue;
    var v4 = page1.firstPage.positioned.rentExempt.rawValue;
    var v5 = page1.firstPage.positioned.header.posSub.storeNbr.rawValue;
    var v6 = page1.firstPage.positioned.header.posSub.storeName.rawValue;
    var v7 = page1.firstPage.positioned.header.posSub.RadioButtonList.rawValue;
    var v8 = page1.firstPage.positioned.header.posSub.storeContact.rawValue;
    var v9 = page1.firstPage.positioned.header.posSub.email.rawValue;
    var v10 = page1.firstPage.positioned.header.posSub.contactsPhone.rawValue;
    var v11 = page1.firstPage.positioned.header.posSub.custName.rawValue;
    var v12 = page1.firstPage.positioned.header.posSub.custPhone.rawValue;
    var v13 = page1.firstPage.positioned.header.posSub.custEmail.rawValue;
    var v14 = page1.firstPage.positioned.dateNeeded.RadioButtonList.rawValue;
    var v15 = page1.firstPage.positioned.dateNeeded.addlInfo.DateTimeField2.rawValue;
    var v16 = page1.firstPage.positioned.dateNeeded.addlInfo.rushFees.rawValue;
    var v17 = page1.firstPage.positioned.dateNeeded.rushProcessingFees.rushFeePrices.rawValue;
    var v18 = page1.firstPage.positioned.dateNeeded.rushProcessingFees.RadioButtonList.rawValue;
    var v19 = page1.firstPage.positioned.chairsArtInfo.RadioButtonList.rawValue;
    var v20 = page2.personalization.header.RadioButtonList.rawValue;
    var v21 = page2.shipping.shipTo.RadioButtonList.rawValue;
    var v22 = page2.shipping.customerAddress.rawValue;
    var v23 = page2.shipping.rushOrders.RadioButtonList.rawValue;
    //REQUEST
    if ((v1 == "") || (v1 == null))
       xfa.host.messageBox( "Please select the type of request" );
       xfa.host.setFocus("page1.firstPage.positioned.firstLine.reqType");
    //ORDER_QUOTE
    } else {
    if ((v2 == "") || (v2 == null))
        xfa.host.messageBox( "Please indicate whether this is an order or quote" );
      xfa.host.setFocus ("page1.firstPage.positioned.firstLine.orderQuote");
    //DESCRIPTION
    } else {
      if (((v1 == "3")) && ((v3 == "" || v3 == null)))
      xfa.host.messageBox( "Please enter a description" );
      xfa.host.setFocus("page1.firstPage.positioned.description");
    //RENT EXEMPT
    } else {
      if (((v1 == "2")) && ((v4 == "" || v4 == null)))
      xfa.host.messageBox( "Please indicate if the order is rent exempt or royalty exempt" );
      xfa.host.setFocus("page1.firstPage.positioned.rentExempt");
    //STORE NUMBER
    } else {
      if ((v5 == "" || v5 == null))
         xfa.host.messageBox( "Please enter the store number" );
         xfa.host.setFocus("page1.firstPage.positioned.header.posSub.storeNbr");
    //SCHOOL'S NAME
    } else {
      if ((v6 == "" || v6 == null))
         xfa.host.messageBox( "Please enter the school's name" ); 
      xfa.host.setFocus ("page1.firstPage.positioned.header.posSub.storeName");
    //COUNTRY
    } else {
    if ((v7 == "") || (v7 == null))
      xfa.host.messageBox( "Please enter the store's country" );
      xfa.host.setFocus("page1.firstPage.positioned.header.posSub.RadioButtonList");
    //STORE CONTACT
    } else {
    if ((v8 == "") || (v8 == null))
      xfa.host.messageBox( "Please enter the name of the store's contact person" );
      xfa.host.setFocus("page1.firstPage.positioned.header.posSub.storeContact");
    //CONTACT'S EMAIL
    } else {
      if ((v9 == "" || v9 == null))
         xfa.host.messageBox( "Please enter the store contact's email address" );
         xfa.host.setFocus("page1.firstPage.positioned.header.posSub.email");
    //CONTACT'S PHONE
    } else {
    if ((v10 == "") || (v10 == null))
      xfa.host.messageBox( "Please enter the customer's telephone number" );
      xfa.host.setFocus("page1.firstPage.positioned.header.posSub.contactsPhone");
    //CUSTOMER NAME
    } else {
    if ((v11 == "") || (v11 == null))
      xfa.host.messageBox( "Please enter the customer's name" );
      xfa.host.setFocus("page1.firstPage.positioned.header.posSub.custName");
    //CUSTOMER PHONE
    } else {
      if ((v12 == "" || v12 == null))
         xfa.host.messageBox( "Please enter the customer's telephone number" );
         xfa.host.setFocus("page1.firstPage.positioned.header.posSub.custPhone");
    //CUSTOMER EMAIL
    } else {
    if ((v13 == "") || (v13 == null))
      xfa.host.messageBox( "Please the customer's email address" );
      xfa.host.setFocus("page1.firstPage.positioned.header.posSub.custEmail");
    //DATE NEEDED
    } else {
    if ((v15 == "") || (v15 == null))
      xfa.host.messageBox( "Please whether the order is needed by a specific date" );
      xfa.host.setFocus("page1.firstPage.positioned.dateNeeded.RadioButtonList");
    //SPECIFIC DATE
    } else {
      if ((v16 == "" || v16 == null))
         xfa.host.messageBox( "Please enter date the order is needed" );
         xfa.host.setFocus("page1.firstPage.positioned.dateNeeded.addlInfo.DateTimeField2");
    //RUSH FEES
    } else {
      if ((v17 == "" || v17 == null))
         xfa.host.messageBox( "Please indicate if rush fees are applicable" );
         xfa.host.setFocus("page1.firstPage.positioned.dateNeeded.addlInfo.rushFees");
    //RUSH PROCESSING FEES
    } else {
      if ((v18 == "" || v18 == null))
         xfa.host.messageBox( "Please select the rush processing fee that is wanted" );
         xfa.host.setFocus("page1.firstPage.positioned.dateNeeded.rushProcessingFees.RadioButtonLi st");
    //CHAIR ART INFORMATION
    } else {
      if ((v19 == "" || v1 == null))
         xfa.host.messageBox( "Please identify the format of the art for the chair" );
         xfa.host.setFocus("page1.firstPage.positioned.chairsArtInfo.RadioButtonList");
    //PERSONALIZATION
    } else {
      if ((v20 == "" || v20 == null))
         xfa.host.messageBox( "Please identify whether personalization is needed for this order" );
         xfa.host.setFocus("page2.personalization.header.RadioButtonList");
    //SHIPPING INFO
    } else {
      if ((v21 == "" || v21 == null))
         xfa.host.messageBox( "Please identify where the order will be shipped" );
      xfa.host.setFocus("page2.shipping.shipTo.RadioButtonList");
    //CUSTOMER'S ADDRESS
    } else {
      if ((v22 == "" || v22 == null))
         xfa.host.messageBox( "Please provide the customer's address" );
         xfa.host.setFocus("page2.shipping.customerAddress");
    //RUSH FEE
    } else {
      if ((v23 == "" || v23 == null))
         xfa.host.messageBox( "Please select the rush fee that the customer wants" );
         xfa.host.setFocus("page2.shipping.rushOrders.RadioButtonList");
    } else {
      Button2.execEvent("click");

  • Multiple arguements in the Click function

    ok now there is another issue, I need to arguments to run in the "Click" function, can I do this? right now for checkbox1 I have
    I need to run two arguements using the click function for exclusive checkboxes. I need it to stay not only exclusive but to make a subform visible...this is what I have so far:
    ScriptObject.ToggleCheckButton(this);
    this.rawValue = "1"; // make sure it stays "on" since this mimics a radio button which can't be turned "off"
    && if(this.rawValue == 1)
    P1Subform.presence = "visible";
    else
    P1Subform.presence = "invisible";
    what is wrong with this arguement?
    I had this set up as radio buttons, but I have the need to disable (and make gray) based upon entry in aprevious numeric field. The disable/gray out feature is working and the exclusive option is working, but it will not open my invisible subform.

    Hi Pradip,
    I just tried your scenario. Try in the following way:
    1. First take the equalsS function from Text functions. Pass source field and  Constant (A) as arguments to that function.
    2. Give the output of that function to If Then Else Boolean Function. For Then part, pass Constant (A) as argument and for else part pass Constant (B) as argument
    Now by second step, you have checked for 'A'. Now you have to check for 'B'. That's why we are passing 'B' to else part.
    3. Now pass the output of ifelse statement to ifwithoutelse boolean function and also Source field as another argument. For then Part, pass cconstant 'B'
    4. Pass the output of this funtion to createIf node function which produces empty value if argument is true (create node with value 'B') else Result.Supress (won't create node)
    I think you understood the concept. If you have any doubts please let me know.
    Regards,
    Jyothi.

  • I need an arithmetical function !

    hi,
    i'd like to insert the following function :
    *if "Amount" is inferior to 10, then result is 50.
    *if "Amount" is superior to 11 and inferior to 30, then result is 75.
    Is it possible ?
    Thanks a lot for your help !
    Alex.

    Alex
    Suppoe you have to text fields on your form named as "Amount" and "Result" respectively. You can write the following script (FormCalc) in the "exit' event of "Amount" text field (the first line of the code is for your reference only, do not include it while psting the code):
    form1.#subform[0].Amount::exit - (FormCalc, client)
    if (form1.#subform[0].Amount.rawValue < 10) then
    form1.#subform[0].Result.rawValue = 50
    elseif (form1.#subform[0].Amount.rawValue > 11 and form1.#subform[0].Amount.rawValue < 30) then
    form1.#subform[0].Result.rawValue = 75
    endif
    In case of any queries, please feel free to contact me.
    Thanks.
    Syed Hussain Itiba Naqvi

  • Difficulty calling a function using Action Builder

    I am trying to write my first script so understand it needs help.
    What I am trying to do is make a timesheet specific to my company.  I want to do automatic calulation when the monRegular box is entered.  I used action builder to help me set it up. 
    The error message I keep getting is:
    TypeError: this.resolveNode("TimeCalc").TimeCalculator() is not a function
    8:XFA:form1[0]:TimeSheet[0]:monRegular[0]:enter
    here is my script:
    function TimeCalculator()  {
         var f = form1.TimeSheet.monRegular.rawValue;
         f = form1.TimeSheet.monOut.rawValue - form1.TimeSheet.monLin.rawValue + form1.TimeSheet.monLout.rawValue - form1.TimeSheet.monOut.rawValue;
         TimeCalculator = f;
    what I am trying to is calculate time ate work and return that value.  I am unfamiliar with javascript.
    here is what Action Builder set up for me.
    form1.TimeSheet.monRegular::enter - (JavaScript, client)
    //+ GENERATED - DO NOT EDIT (ID:51E32615-7D96-4FF8-8EA8-F3A9D2BCD39D CRC:2494738674)
    //+ Type: Action
    //+ Result1: Custom("$Node2","TimeCalculator","","returnto","$Node1")
    //+ Node2: form1[0].TimeSheet[0].#variables[0].TimeCalc[0]
    //+ Node1: form1[0].TimeSheet[0].monRegular[0]
    //+ Condition1: NumericField("$Node1","entered","")
    //+ ActionName: monRegular.enter
    this.resolveNode("$").rawValue   = this.resolveNode("TimeCalc").TimeCalculator();
    Where can I go to find some good examples of how to set up fuctions and classes.  You can explain it to me all day but I need an example to understand it.
    Travis

    Hi ClayMarker52,
    Per my understanding you want to use the RGB value in the expression instead of using the "Red","Green","Black" to specify the color, right?
    I have tested on my local environment and you can see the three colors convert to Hexadecimal is like below and you can use these value in the expression:
    Unresolved to use R:231 G:65 B:8  ---#e74108
    Resolved to use R:74 G:142 B:247  ---#4a8ef7
    Open to use: R:255 G:227 B:132    ---#ffe384
    Click the Background Color or Color and select the "More Color"
    The Select Color window is open, after you enter the RGB value in the Select color window and click ok you will find the Hexadecimal value in the color inputbox:
    Then you can modify the expression as below:
    =IIF(Fields!Inc_UserText6.Value = 1,"#e74108",  IIF(Fields!Inc_Status.Value = "Completed" or Fields!Inc_Status.Value = "Closed", "#4a8ef7", "#ffe384")) 
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

Maybe you are looking for

  • Over writing condition value

    Dear All, We have maintained condition record for BED, Scess and SHcess in our company. Now, a new requirement has come up to maintain automatic as well as manual condition types for excise duties. Whenever we enter the manual excise condition type, 

  • How to mass relink photos?

    Hi there,      yesterday my muse disk become unusable disk X:\  (of course I had a backup) I have restored the muse file (photo gallery with 400 photos) that was in the lost disk folder x:\musefolder. The new disk has a permanent name D:\ so I restor

  • Oracle 7.x connection through Java application.

    I have Win98 and Oracle 7.x on my P.C., I am developing an application in Java Menus where under one menu one can get a connection with the underlying Oracle DB. But even after proper JDBC coding I am not able to get the connection. Please help. Thna

  • Where can I report malicious apps?

    I just downloaded an app saying it is for gtalk. Actually it is for stealing your google password. After logging in, I got notified someone tried to log in to my google account from the US. I was stupid, but could we avoid others do the same mistake?

  • Unable to install flashplayer, what do I do ?

    In trying to upload a picture, I followed instructions to download flash player, then clicked run, then a warning appeared for me to cancel, program would harm my computer. I've also checked for plugins but while it states its searching for them it n