## Conditional Parameter Details

Conditional logic feature can be used to define the value of any parameter by any defined condition. It can have multiple conditions using 'If' and 'Else If'.

### EXAMPLE:

1. If ( accountName = "Netstorm" )
   - Set ScratchArray_0 = "Netstorm"
2. If (accountNum = 1234)
   - Set accountBal = 45000.00
3. If (accountType = "Saving" AND accountBalance> 100000.00)
   - Set customerType = "Priority"
4. If (accountType = "CreditCard" AND amountDue> 90000.00)
   - Set accountStatus = "OverLimit"
   - Set accountLimit = 0
5. If ( accountName IN "Netstorm,cavisson" )
   - Set scratch = RandomList (1,2,3,4,5,)
   - Set ScratchArray_0 = "Netstorm"
   - Set ScratchArray_1 = "123456"
   - Set ScratchArray_2 = "COMPASS"
   - Set scratch = "007"
   Else If ( search = 567 )
   - Set ScratchArray_4 = UnqNum
   Else
   - Set scratch = "1001"

## Parameter Details

In the parameter details, the user has to provide the following information:

- Condition : In this field, the user has to select the condition for the expression in the parameter. There are following types of conditions: <0l class="ol-styled">
- If
- Else If
- Else

Note Once the user has selected the condition they want to use, the user has to click on the ADD button in order to add the condition. After adding the condition only, the other fields will be enabled and the user can add the values for those fields.

- Select Expression : This field is used to define the expression for condition. Expression can be any parameter value: equals to/not equals to any other parameter value. Expression can also be compare between any parameter values with any constant defined value. In select expression, there are following fields:
  1. Select Parameter In this field, the user has to select the parameter to be used.
  2. Select Type In this field, the user has to select the type of parameter to be passed.
  3. Select Conditional Operator In this field, the user has to select the conditional operator which they want to use.

Note Once the user has entered all the values the respective fields, then the user has to click on ADD button in order to add parameter details. On adding the parameter details, then only the user will be able to select the Logical Operator.

- Logical Operator : A logical operator is a symbol or word which are used to connect two or more phrase of information. Multiple conditions can also be applied using logical operator between them. The user can select any one of the following option:
  1. AND If AND operator is used in-between two condition, then the whole condition will be satisfied only when both the conditions are satisfied.
  2. OR If OR operator is used in-between two condition, then the whole condition will be satisfied when any one of the condition is satisfied.

## Set Parameter

The set parameter detail is used to define the value of which parameter is going to set through this condition. There are following types of parameter used:

- Constant : In this field, the value of the parameter defined is constant.
- System Parameter : In this option, system provides a dropdown which contains all system variables. System variables are pre-defined variables and bundled with Service Virtualization product.
- Other Parameter : In this option, system provides a dropdown list which contains already created parameters in the service.
- System Generated Unique Value : It will provide the unique value which are generated from the system.
- Random Value From/To : In this option, the user has to define the starting and ending of a random value.
- Random Value From List: In this option, the user can define multiple values separated by ",". System takes any value randomly out of them.

Note Once the user has entered all the values the respective fields, then the user has to click on ADD button in order to add the set parameter details. On adding the set parameter details, the user can see the details on the logical block. User can also save the Conditional Logic Parameter details, by clicking on the Save button.