Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

How to Use Switch Statement with Exclusion Group (radio buttons)?

$
0
0

Wouldn't you know, just when I though I'd really be making progress, I've come across another problem I can't solve. In a homeowners insurance application I am building, there is an exclusion group that needs to set the value of several variables

 

I have setup in the form properties/variables. These variables take on different values depending on the users choice.  For the exclusion group, in the object pallet, I have set the binding to normal, and have checked the "Specify Item Values" check box. Also the values for the choices have been assigned 1,2,3,4,5.

 

Here is my code for the change event fir the exclusion group (This is exactly what I have tried). For now, the values for the variables to take on in the different cases, are completely arbitrary.

 

switch (this.change.rawValue)              // I have tried so many things here
{   
    case "1":                                        // I have tried the caption, single quotes in all combinations
        addLivingExp = "1";
        damageOthersProperty = "2";
        liabilityIncl = "3";
        maxCoverage = "4";
        minCoverage = "5";
        persProperty = "6";
        relatedPrivateStruct = "7";
        break;
    case "2":    
        addLivingExp = "10";
        damageOthersProperty = "20";
        liabilityIncl = "30";
        maxCoverage = "40";
        minCoverage = "50";
        persProperty = "60"
        relatedPrivateStruct = "70";
        break;
    case "3":    
        addLivingExp = "100";
        damageOthersProperty = "200";
        liabilityIncl = "300";
        maxCoverage = "400";
        minCoverage = "500";
        persProperty = "600"
        relatedPrivateStruct = "700";
        break;
    case "4":    
        addLivingExp = "1000";
        damageOthersProperty = "2000";
        liabilityIncl = "3000";
        maxCoverage = "4000";
        minCoverage = "5000";
        persProperty = "6000"
        relatedPrivateStruct = "7000";
        break;   
    case "5":    
        addLivingExp = "10000";
        damageOthersProperty = "20000";
        liabilityIncl = "30000";
        maxCoverage = "40000";
        minCoverage = "50000";
        persProperty = "60000"
        relatedPrivateStruct = "70000";
        break;   
    default:   
        minCoverage= 5;   
        break;
}

 

There must be something obvious I am missing? Eternally grateful for advice on this.

 

Stephen


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>