In this document and accompanying video we will discuss how to conditionally display items in the List Control.
In a previous document and video we showed how to put a button in the list, but in this example we have specified that the button is only going to be shown in a particular row if Contacttitle is Owner:
Let's take a look at how that was done. Click on the Design tab, then List properties to bring up the List Builder window:
Click on the Fields tab in the List Builder window, which is where we defined the button (b1) to begin with. Click on the button to see that we have a Show/hide expression that says CONTACTTITLE = "Owner". Click on the smart field to see how that expression is defined:
When the Client-side Show/Hide Expression window opens we see that this is a client-side calculation so we can use Javascript syntax in the expression if we would like. Click on Using Javascript Syntax for Expression for help with that. We can also use the Xbasic syntax that gets converted into Javascript at runtime. Click Insert Function for the Xbasic syntax:
The Show/Hide Expression can be as simple or as elaborate as needed.