For Text widgets and Text Box widgets it is possible to define rules which allow you to have different text appear for different features. To access the Text Rules dialog , right-click on a Text widget or Text Box widget and select ‘Rules’ from the menu.
When you first open the ‘Edit Text Rules’ dialog you will see a ‘Default’ tab which contains the standard or default text of the Text widget or Text Box widget. You can change this text here by clicking on the ‘Edit text’ icon at the top right. The second tab, ‘Add Rule’, allows you to add a rule. You can add as many text rules as you like.
The standard options allow you to define a rule depending on the name of a selected feature, on the value of a certain field or you can define rules that depend on a field being less then or more than a certain value.
There are also advanced options available for a more detailed definition of text rules.