Define Diagnosis
Diagnosis is the most critical component of NI. You can define the logic of validating and verifying the network design in Diagnosis and create diagnosis notes. A common diagnosis is as simple as: if the variable is not equal to a specific value (the baseline value) and then creates a diagnosis note. Status code describes NI execution results (Alert or Success).
- On the Define Diagnosis tab, click Add Diagnosis. Enter a diagnosis name and description.
- Select a relevant variable as an anchor. Anchor defines where the diagnosis is displayed on the input text.
- Set the If condition as state Does not contain FULL.
Note: You can define the table key by selecting table columns. Columns set as table keys will be displayed on the interface and synchronized to the table definition. Note: You can also define the whole table-based diagnosis, inline expression, and sub table here. - Define the diagnosis message color and text. And select the Set Status Code for Device check box to add a status code at the device level or Set Status Code for Intent check box to add a status code at the NI level.
Note: You can view these two levels of status codes and their summaries in execution result. See View Intent Status Code for more details.
Note: You can click Add Logic to add more logics. See Types of Diagnosis Logic for more details about the logic set. - (Optional) You can add the Elseif branch under the If branch to specify more conditions.
Note: Elseif branches can only be added after the If and Elseif branches, and Else branches can only be added to the end. - You can click Add Logic > Advanced > Break Current Loop to add the Break Current Loop logic to control the flow of the loop table row. When the table row loops, as long as the condition is satisfied, the current loop table will be terminated to reduce the calculation of the redundant loop.
Note: The Break Current Loop option can be available only when the Loop Table Rows is checked. - After defining the diagnosis, add a note for it. You can select an anchor and enter the note for this anchor.
Variable of Baseline/Last in Diagnosis Note
You can insert variables when defining diagnosis message and status code, which can output the current value and Last/Baseline value in the comparison of the variable’s current value with its Last/Baseline value in diagnosis. It makes the status code note more detailed and valuable.
Enter $ in a note and the Define Link to Variable dialog will pop up directly. Select the variable in this dialog and you can also select the source corresponding to the variable.
The selected source will be displayed as follows.
![]() |
Note: Only when the value of the variable baseline or last is referenced, it will be displayed as Baseline(var1) or Last(var1), such as $capabilities(Baseline) and $capabilities(Last). |