I am trying to only have one coupon (resource), which can be used in 4 different positions, that uses a var1 that has different values depending on which text box is to be used. I am a not very experienced with Java, but here is what I have so far. I feel like I need some sort of way to determine which text box is to be used.
if (Field("COUPON_COD") == "C1")
{
return("MyVar1", Field("N_VAR_1"));
}
if (Field("COUPON_CO2") == "C1")
{
return("MyVar1", Field("N_VAR_1__2"));
}
if (Field("COUPON_CO3") == "C1")
{
return("MyVar1", Field("N_VAR_1__3"));
}
if (Field("COUPON_CO4") == "C1")
{
return("MyVar1", Field("N_VAR_1__4"));
}
Thanks,
Marcus