In the Detail view (XXXX_S1
), locate the ColumnListItem
control. This control sets the template for all items in the list bound to the table you added earlier in Build. Each row in the table contains a Label, Image, Identifier, Text, and Object Number control.
You are going to update the ObjectNumber
control to add some formatting to the number.
In the ObjectNumber
control definition, locate the state property. Instead of using a default state, you can calculate the state at runtime. You’ll create an IF
statement inside of the property definition. You can compare the Available and Demand fields to see if your need is greater than your supply. If the availability is less than 60% of the demand, you can set the state to Error so the issue is highly visible. To do this, replace none with the following expression:
{= ${Available} > ${Demand}*.6 ? 'None' : 'Error'}
This is called Expression Binding. Learn more about expression binding.
SAVE your changes.