Scripts not working not properly

Hi All,
 I have written the below code, and placed it on the exit event of a drop down list on a form that I am working on. The script works some times, and sometimes, it does'nt work right.
I do not know why it is not working right all the times. I need help with possibly what I may be missing.
 
 if(ReasubdrpdwnList1.rawValue=="Annual"){
   ReasonFor.rawValue="2";
   }
if(ReasubdrpdwnList1.rawValue=="Change of Rater"){
        ReasonFor.rawValue="03";
   }
if(ReasubdrpdwnList1.rawValue=="Change of Duty"){
   ReasonFor.rawValue="04";
   }
if(ReasubdrpdwnList1.rawValue=="PCS"){
   ReasonFor.rawValue="04";
   } 
if(ReasubdrpdwnList1.rawValue=="REFRAD"){
   ReasonFor.rawValue="04";
   }
if(ReasubdrpdwnList1.rawValue=="Retirement"){
   ReasonFor.rawValue="04";
   }
if(ReasubdrpdwnList1.rawValue=="Discharge"){
   ReasonFor.rawValue="04";
   }
if(ReasubdrpdwnList1.rawValue=="Reassignment"){
   ReasonFor.rawValue="04";
   } 
if(ReasubdrpdwnList1.rawValue=="Relief for cause"){
   ReasonFor.rawValue="05";
   }
if(ReasubdrpdwnList1.rawValue=="Depart TDY"){
   ReasonFor.rawValue="06";
   }
if(ReasubdrpdwnList1.rawValue=="60 day opt"){
   ReasonFor.rawValue="07";
   }
if(ReasubdrpdwnList1.rawValue=="SR option"){
   ReasonFor.rawValue="08";
   } 
if(ReasubdrpdwnList1.rawValue=="Complete Rec"){
   ReasonFor.rawValue="09";
   }
if(ReasubdrpdwnList1.rawValue=="Ext annual"){
   ReasonFor.rawValue="10";
   }
if(ReasubdrpdwnList1.rawValue=="Promotion"){
   ReasonFor.rawValue="11";
   }
if(ReasubdrpdwnList1.rawValue=="REFRAD (USAR/ARNG ONLY)"){
   ReasonFor.rawValue="12";
   }  
if(ReasubdrpdwnList1.rawValue=="REFRAT"){
   ReasonFor.rawValue="12";
   }
if(ReasubdrpdwnList1.rawValue=="REFRADOS-RC"){
   ReasonFor.rawValue="12";
   } 
if(ReasubdrpdwnList1.rawValue=="REFRADOS"){
   ReasonFor.rawValue="12";
   }
if(ReasubdrpdwnList1.rawValue=="REFRCO-AD"){
   ReasonFor.rawValue="12";
   } 
 
 Thanks
 
 v/r
 
 Tammy          

V/r there is no problem with your script. Can you please mention for which selection your script fails.
I suggest you use Swtich statement instead of using multiple loops if.

Sofiane

Tags: Adobe LiveCycle

Similar Questions

  • iPhone upgrade of the navigation software now works not properly

    iPhone 5

    New IOS software updated and now the navigation screen not working not properly

    is your site on?

  • Satellite Pro U200: VGA output works not properly when the AC adapter / CC has been connected

    Hello

    I have a problem with vga output. When I'm working on the battery and connect my laptop to external monitor is ok, but when I connect adapter then start waving also bluetooth and wlan is not working properly. In other cases when I disconnect laptop battery and connect the AC adapter it works correctly.

    Thanks in advance

    Hello

    Can you please describe more precisely what is happening here? Does not properly is a rather general statement.

  • Mac Labs: ARD login script not working only off 10.11

    I run the laboratory of computer science at the State University.  5 laboratories w / 100 + machines.  We have been a Mac shop all since switching to Intel chips.

    I use the following login for the years script:

    name = "user";

    password = "pword";

    osascript<>

    Tell application "system events".

    hit tab

    strike (character ASCII 8)

    hit tab

    strike (character ASCII 8)

    strike back

    delay 0.5

    hit tab

    combination of keys '$name '.

    hit tab

    delay 0.5

    combination of keys '$password '.

    delay 0.5

    strike back

    strike back

    tell the end

    EXPRESSIONS OF FOLKLORE

    When I send to a machine (with and without SIP) 10.11, I get the following message is displayed in the status field of the task:

    osascript [261:2199] CFPasteboardRef CFPasteboardCreate (CFAllocatorRef, CFStringRef): failed to create aggregate data

    I don't know if the problem lies with ARD admin being 3.8 and 10.11 being 3.8.5 client.  I had similar problems with disparity admin/customer a while back who disappeared when ARD admin has been updated.

    Not being able to connect on my machines 100 + is a deal breaker.  I can't deploy 10.11 nor I can recommend that we buy new machines this year (we replace generally 1/3 each year).

    Someone at - it a script that works in 10.11?

    Hi, solves this problem already? I would be interested in the solution because I have the same problem with my El Cap clients...

    Thanks in advance for your help.

  • Video error for a single show - "video error: the files needed to display video are not installed or not working not properly.

    I get a "video error: files needed to display video are not installed or not working not properly."  Please restart Media Center and / or restart the computer. »

    Windows XP MCE 2005 on a PC HP Media Center m750n with 2 GB of RAM, Intel Pentium D 920 processor and more than 230 GB of free hard disk space.

    The strange thing is, it only happens for a show, "Star Trek: The Next Generation" at 07:00 on channel 55 Houston.  Sometimes it is live or recorded.  Shown immediately before and immediately after about 55 works fine, as does anything on any other channel. (Although if I leave the video error for more than a few seconds, then I get an error of the tuner on the other channels until I quit Media Center and bring backup.)

    Maybe my computer is a militant fan of Star Wars?

    Windows XP Media Center 2005

    If this only happens in a show on a channel and passes every day but others
    shows on the same channel are watchable/recordable, it is possible that a copy
    never flag is set that is manifested by the video display
    error message.
     
    I would recommend that you post this topic on the forums of http://thegreenbutton.com .
     
    Tuesday, July 27, 2010, 00:54:06 + 0000, Pseudo Witty says:
     
    >
    >
    > I get a "video error: files needed to display video are not installed or not working not properly."  Please restart Media Center and / or restart the computer. »
    >
    > Windows XP MCE 2005 on a PC HP Media Center m750n with 2 GB of RAM, Intel Pentium D Processor 920 and more than 230 GB of free hard disk space.
    >
    > The strange thing is, it only happens for a show, "Star Trek: The Next Generation" at 07:00 on channel 55 Houston.  Sometimes it is live or recorded.  Shown immediately before and immediately after about 55 works fine, as does anything on any other channel. (Although if I leave the video error for more than a few seconds, then I get an error of the tuner on the other channels until I quit Media Center and bring backup.)
    >
    > Maybe my computer is a militant fan of Star Wars?
    >
    > Windows XP Media Center 2005
     

    Barb Bowman

    http://www.digitalmediaphile.com

  • Video error: the files needed to display video are not installed or not working not properly. Please restart Windows Media Center...

    Please help - it's driving me crazy! I got this to work!

    I am using Vista Ultimate and a connection (cat-5) ethernet to an xbox 360 as a Media Extender (via a Linksys router). I get the error of the video:
    "The files needed to display video are not installed or not working not properly." Please restart Windows Media Center or restart the computer "."

    I have a Happauge PVR 150 TV capture card installed, and you want to watch TV and my video files Via the Xbox 360. I can see the guide for lists of TV programs, but not to look at them without getting the message above.  I can also put in place a program to record, display the video thumbnail, but not play. Video files only will play are videos very select few years recorded only where there is.

    My graphics card is an ATI 2900XT - 512 MB of ram, with the latest drivers.

    I've seen a number of discussions on the web that describes the same (or similar) problem, but none of them seem to have no solution.

    I had Norton Internet Security installed and it has since withdrawn because of the firewall. I had thought, it could be a firewall issue, but it is not. I'm now using the Windows Firewall for now.

    I deleted and reinstalled the Xbox as an Extender media several times... no help. I have re-installed the complete drivers for the video capture card, it has not helped either. I checked and double-checked the settings on my router as well.

    The xbox is set for the share on my multimedia computer. The correct files can also be programmed for sharing.

    On the PC in Windows Media Center, I can view the TV programs, record programs etc etc etc all work.

    Any help would be really appreciated!

    Hello Lowwatts,

    Microsoft Xbox 360 community

    Thank you for visiting the website of Microsoft Windows Vista Community. The question you have posted is related to

    Microsoft Xbox360 community and would be better suited to the Microsoft's Xbox 360 community. Please visit the link below to find a community that will provide the support you want.

    Community Microsoft Xbox360

    Try following the steps in this article:

    Enjoy Windows Media Center on your Xbox 360 with your music, photos, recorded Live TV * and online media

    This should solve your problem.

    Let us know if these steps solve your problem.  I hope the information is useful.

    Kind regards

    Anthony
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Deskjet 6122 driver will not properly work on a HP Proliant ML 150 6 Win Server

    Deskjet 6122 driver will not properly work on a HP Proliant ML 150 6 server running Window server 2003 Enterprise edition SP2. I have loaded driver 990c and it works, but the side two the 6122 print function will not work with 990c. Is there any solution for this?

    I'm afraid that there is no specific driver for this OS. The 990c driver will be the only option to get to work. I'm sorry.

  • The Adobe Extension Builder 3 works to run a project in Photoshop CC2015.5 without getting "the extension could not be loaded because it was not properly signed.

    Hello world

    The Adobe Extension Builder 3 works to run a project in Photoshop CC2015.5 without getting "the extension could not be loaded because it was not properly signed"?

    OR

    Is there a way to convert my panels that works perfectly in CC2015 up to the CC2015.5version?

    I hope someone can give a solution, because everything that I could find were unanswered questions.

    Thank you all for your generous contribution

    Stone

    You have set the indicator of debugging for 2015.5 CC: HTML Panel advice #21: Photoshop CC 2015.5 survival guide | Photoshop, etc ?

  • Manual lens correction works not properly.

    I am trying to correct the perspective of an image in lightroom or in the vertical and horizontal manual lens corrections are not working properly, they are extending to the image in a weird way. I used these cursors repeatedly but I don't know why sometimes, they stretch the image. Here's a video that shows the effect of cursors: Lightroom: manual lens correction works not properly - YouTube. I would like your opinion on this is that you know how I can solve this problem. Thank you

    Controls LR Vertical and Horizontal Correction lens are designed to 'fix' the perspective distortion. What is the perspective of "normal"?

    Normal lens - Wikipedia, the free encyclopedia

    Lenses wide angle move the vanishing points more far and telephoto lenses get the close.

    https://en.Wikipedia.org/wiki/Perspective_distortion_%28photography%29

    LR Vertical and Horizontal controls use the focal length and camera metadata from the image file and adjust the image based on its effective focal length. A goal of 200mm if on a 1.5 crop body factor has an effective focal length of 300mm, resulting in an extreme telephoto perspective. That's why you see more "stretch" the image when you adjust the Vertical control, with a focal length lenses below)<>

    The image file video YouTube has vertical converging vertical very light, slight clockwise rotation and distortion in light pad. You should be able to correct the image for parallel verticals with small values of Vertical and Rotation adjustment. I suggest using "Activate profile Corrections" (profile tab) to fix the small amount of lens distortion.

    So always questions please post the image file on Dropbox or other filesharing site and I'll take a look. Thank you.

  • PHP form script is missing from the web server or PHP is not properly configured on your web hosting provider. Help - I get this message on my site when the form is filled out and you press send... Check if the form PHP script has been downloaded correctl

    PHP form script is missing from the web server or PHP is not properly configured on your web hosting provider. Help - I get this message on my site when the form is filled out and you press send... Check if the form PHP script has been downloaded correctly, contact your host about the configuration of PHP.

    Hi Graham,

    If you, please add your site to this link ( http://my-site.com/scripts/form_check.php ) and make sure that all green checkmarks are appearing. If they don't, let us know what errors you seem to receive and include the link to your site.

    In addition, check out this guide on the forums of Muse troubleshooting: Troubleshooting Muse form used on the servers of third party Widgets

    I hope this helps!

    Emily

  • Why the tableStyle script not working, when the other two are

    Hi, please can you help and thank you in advance. I'm puzzled. As you can see, I am new to scripting - a glance through the 15 pages on the forum showed me how the news - and I want a workflow in which I put the styles and then use in this case, "appliedTableStyle" to connect to the appropriate table.
    My question is why this style of table script not work and appear in the palette? (when the two scripts below paragraphs and cells are) I tried the doc.tableStyles.add and the doc.tableStyle.add. Please show me where I'm wrong, or a better alternative. Thank you.
    docTest = app.documents.add)
    table_styles (docTest)
    cell_styles (docTest)
    para_styles (docTest)
    function table_styles (doc)
    {
    with (doc)
    {
    //try {doc.tableStyles.add
    try {doc.tableStyle.add
    ({
    name: "tableGLOBAL."
    bodyRegionCellStyle: doc.cellStyles.item ('cellGLOBAL'),
    headerRegionSameAsBodyRegion: true,
    bodyRowCount: 10.
    headerRowCount: 1.
    })
    }
    catch {} (_)
    }
    }
    function cell_styles (doc)
    {
    with (doc)
    {
    try {doc.cellStyles.add
    ({
    name: "cellGLOBAL."
    appliedParagraphStyle: doc.paragraphStyles.item ('paraBodyGLOBAL'),
    topInset: 0,
    leftInset: 0,
    bottomInset: 0,
    rightInset: 0,
    verticalJustification: VerticalJustification.CENTER_ALIGN,
    firstBaselineOffset: FirstBaseline.LEADING_OFFSET,.
      })
    }
      catch (_){}
    }
    }
    function para_styles (doc)
    {
    with (doc)
    {
    try {doc.paragraphStyles.add
    ({
    name: "paraBodyGLOBAL."
    appliedFont: "Arial,"
    firstLineIndent: 0,
    justification: Justification.LEFT_JUSTIFIED,.
    pointSize: "6 pt."
    main: '8 '.
    })
    }
    catch {} (_)
    }
    }

    Your trial... construction of capture hides the real error - during the development of a script, you can not use.

    When I removed it, ID has reported only with the message quite without value

    "Error string: this attribute is not defined for the table styles.

    Source: ts = doc.tableStyles.add({")

    without saying what attribute... Try one by one, I found this particular result: you cannot initialize 'headerRegionSameAsBodyRegion '... Probably because you cannot initialize without a header first, and you don't "do" again because you always initialize the entire style.

    But this workaround works:

    ts = doc.tableStyles.add({
     name: 'tableGLOBAL'
     , bodyRegionCellStyle: doc.cellStyles.item( 'cellGLOBAL' )
     , headerRowCount: 1
     , bodyRowCount: 10
    });
    ts.headerRegionSameAsBodyRegion = true;
    
  • device control panel works not properly. Cannot read messages about it. How can I fix this?

    Have a HP Officejet 6500 E709n, OS is Windows 7-64 bit. Control Panel on the front of the printer device does not properly. Cannot read messages of information/on it.  What is the problem?

    Certainly looks like a hardware problem (LCD going / has went wrong). At this point, I recommend you contact the support for repair or replacement.

  • Script assist works like javascript, but not Photoshop

    I'm trying to get these 2 scripts to work together.

    This works fine in Photoshop.

    #target photoshop
    if (app.documents.length > 0) {
        var myDocument = activeDocument;
        var fileNameNoExtension = myDocument.name;
        
      fileNameNoExtension = fileNameNoExtension.split( "." );
        
      if ( fileNameNoExtension.length > 1 ) {
           fileNameNoExtension.length--;
        }
    
        fileNameNoExtension = fileNameNoExtension.join(".");
        
        var BrandID = fileNameNoExtension.substr(0,4);
        var ItemType = fileNameNoExtension.substr(4,2);
        alert(ItemType)
    }
    

    The alert is just for a test, a file named EM10NW021231.jpg returns the "ItemType" as "NW".

    This part of the script runs as javascript

    var itemTable = [ 
    {itemType: "RI", BorderIncrease:"180"}, 
    {itemType: "NW", BorderIncrease:"115"}, 
    {itemType: "CL", BorderIncrease:"115"}, 
    {itemType: "BW", BorderIncrease:"120"}, 
    {itemType: "SC", BorderIncrease:"120"}, 
    {itemType: "ER", BorderIncrease:"150"}, 
    {itemType: "WW", BorderIncrease:"140"}, 
    {itemType: "WA", BorderIncrease:"140"}, 
    {itemType: "HR", BorderIncrease:"140"}, 
    {itemType: "JM", BorderIncrease:"100"}, 
    {itemType: "NA", BorderIncrease:"100"} 
    ];
    
    var BorderIncrease = itemTable.filter(function ( obj ) { 
        return obj.itemType === "BW"; //BW is to be replaced with ItemType
    })[0];
    
    alert(BorderIncrease.BorderIncrease);
    

    How can I combine these together where line 16 is to replace the "BW" with the ItemType since the first script?

    Thank you very much

    Matt

    Please try this.

    #target photoshop
    if (app.documents.length > 0) {
        var myDocument = activeDocument;
        var fileNameNoExtension = myDocument.name;  
    
      fileNameNoExtension = fileNameNoExtension.split( "." );  
    
      if ( fileNameNoExtension.length > 1 ) {
           fileNameNoExtension.length--;
        }  
    
        fileNameNoExtension = fileNameNoExtension.join(".");  
    
        var BrandID = fileNameNoExtension.substr(0,4);
        var ItemType = fileNameNoExtension.substr(4,2);
        alert(ItemType)  
    
    var itemTable = [
    {itemType: "RI", BorderIncrease:"180"},
    {itemType: "NW", BorderIncrease:"115"},
    {itemType: "CL", BorderIncrease:"115"},
    {itemType: "BW", BorderIncrease:"120"},
    {itemType: "SC", BorderIncrease:"120"},
    {itemType: "ER", BorderIncrease:"150"},
    {itemType: "WW", BorderIncrease:"140"},
    {itemType: "WA", BorderIncrease:"140"},
    {itemType: "HR", BorderIncrease:"140"},
    {itemType: "JM", BorderIncrease:"100"},
    {itemType: "NA", BorderIncrease:"100"}
    ];  
    
    var BI = BorderIncrease(itemTable, ItemType );
    alert(BI);
    
    function BorderIncrease(Arr, Item){
    for(var z in Arr){
    if(Arr[z].itemType === Item){
       return Arr[z].BorderIncrease;
        }
     }
    return 0;
    };
    };
    
  • Monitor display is not properly in Windows XP sp3

    Original title: Windows xp sp3 does not properly

    Hello, I do not know if this issue belong to the material division of the forum. I have an old system who have windows xp sp3. It was working fine until week couple but after a few days when I switched it on the screen is not displayed correctly.

    All the colors randomly displays as a spot on the screen and the other letters in a sentence is missing. I tried in safe mode with just visible in debug mode, but it doesn't happen in the journal to the screen. I can not even reinstall windows xp. Now I'm not able to understand if it's the problem of the operating system or a malfunction of certain components of the computer. Please help me.

    Thanks in advance.

    Hello

    Method 1:

    I suggest you to start the computer using the VGA Mode.

    (a) restart the computer

    (b) press F8

    (c) in the start menu

    (d) choose the option

    (e) activate the VGA Mode

    This option starts Windows in mode 640 x 480 using the current video driver (not Vga.sys). This mode is useful if the display is configured to a setting that the monitor cannot display.

    Reference:

    To start the computer in safe mode

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/boot_failsafe.mspx?mfr=true

    Method 2:

    If you are able to start the computer using the VGA Mode, you can perform a system restore to the date where the computer worked well.

    How to restore Windows XP to a previous state

    http://support.Microsoft.com/kb/306084

    If you use system restore when the computer is in safe mode, you can't undo the restore operation. However, you can run System Restore again and choose a different restore point if any. You can also create Safe Mode system restore points. System Restore affects the Windows system files, programs and registry settings that have been changed recently. It can also make changes to scripts, files, batch and other types of executable files on your computer. System Restore does not affect personal files, such as e-mail, documents, or photos, so it cannot help you restore a deleted file.

    If the problem persists, you may need to contact the manufacturer of the monitor to the stand.

  • Scrolling the page does not properly respond to BlackBerry Curve9360

    Hello friend

    I have developed applications for BlackBerry (JqueryMobile, Phonegap) the application works fine in BlackBerry Torch 9800.

    But once I've installed in BlackBerry Curve9360, scrolling of the page does not properly, that I am not able to view the complete list of items and long text.

    Help, please

    I came up with the solution, the problem occurs because BlackBerry Curve 9360 isn't a touchscreen, there fore scroll doesn't work.

    In my applications, I add 2 pages "index.html."

    on the first page, you have to test if the device is not touch and redirect to the second page.

    Do not use the page for "BB Curve" scroll and any other animation like CSS "" - webkit - transform: translate3d "»

    The other js script go without a problem.

    The page "BB Curve" to redesign the html for use with the cursor,
    For example, the menu is smaller, the police is smaller.
    the size of the screen is fixed.
    Dimension height is better indicate a value min eg 300px
    etc...

  • Safari Web Clip does not properly

    Hello everyone

    I have a problem with safari Web Clip and that is does not properly for almost all pages, as example, I participate in a contest of therapy dbrand/unbox, and I really don't want to open the web page, whenever a new winner is announced, so I created a web clip, but it does not work well When I click the web clip icon he asked the location of the clip and when click on done, the web clip is from a different region and I can't fix.

    Is this some sort of bug or can I fix it myself?

    Web Clip still didn't work if the cut element remains in the exact same on exactly the same site. This is apparently not the case here.

    Dashboard widgets in general, are an old technology that has not been updated in many years.

Maybe you are looking for