You need to sign in to do that
Don't have an account?
Marcoppp
Apex if else statment
Hi
Could somebody tell me how to make this if else statment working correctly?? Namely I would like to have 3 more statments like the one below as based on validation I want to display different messages for if and for else. How to place 2 more if else statment ???
if (aText == 'A' ) {
this.success = response__c;
this.validationMessage = null;
} else {
this.validationMessage= validationMessages.NoValid__c;
this.success = null;
}
Thanks in advance
Hello,
You can use Esle If, ex:
if (place == 1) {
medal_color = 'gold';
} else if (place == 2) {
medal_color = 'silver';
} else if (place == 3) {
medal_color = 'bronze';
} else {
medal_color = null;
}