Else-If
Last updated
Was this helpful?
Last updated
Was this helpful?
This action in Avo Assure is available under the generic element. It instructs the Avo Assure client to utilize conditional statements to provide an alternative condition when the initial If conditions got failed, without If action we cannot execute Else-If.
Input: (<operand1>;<operator>; <operand2>)
An operand is the value or data that an operator acts upon. It can be a constant (number, string, etc.).
An operator is a symbol or Mathematical operation that performs a specific operation on one or more operands.
Supported Input Format:
1. Text
2. Static values/ Dynamic variables
3. Supported operators: >, <, ==, >=, <=, != along with the logical operators AND, OR, NOT
Output: <Dynamic Variable>(Optional);<Dynamic Variable> (Optional)
In this scenario, users are testing a financial application that calculates tax based on a user’s income. The application has different tax conditions, and users want to verify if the tax is calculated correctly based on the income entered. The user will check which tax bracket the income falls into and calculate the tax accordingly.
In this example, we are using Else-If condition since there are more than one condition that needs to be satisfy. So, if income is greater than or equal to 75000 then it will execute if block, else it will check another If condition which is under elseif part that is, income greater than or equal to $50,000 then it will execute the Else-If block. If both conditions are false, then it will execute else block.
User income is given as a 60,000 rs
Income=60,000
20% tax needed to be showcased as a result, which is stored in the “TaxRate2” variable.
As per the scenario, user tax is 20% to get the output.