cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

Data Column Properties

Started ‎11-08-2022 by
Modified ‎11-08-2022 by
View Fullscreen Exit Fullscreen

In addition to the various attributes, data columns have properties associated with them. A column's properties affect how JMP uses it. Examples of column properties include formulas, notes, range and list checks, value labels, value order, axis specifications, and units. And there are many more properties with specialized applications. We'll illustrate the examples here as messages to an existing column, but column properties can also be specified when you create a new column. You add most properties to a column as arguments to Set Property, but let's take a look at some exceptions before discussing that syntax. So, there are a few properties that have their own named arguments or messages. Let's start with formulas. You can use either the Set Formula or Formula message to store a formula in a data column. Keep in mind, though, that it's often unnecessary to use a formula as a column property when you're populating the column with a script, because there are other methods you can use, like the For Each Row function, for example. If you do need to use a formula, JMP provides several messages that you can use to manage them. In addition to the Set Formula message, there's a Get Formula message that returns the formula stored in a column. And you can use the Delete Formula message to remove the formula from the column. There are several messages that control formula evaluation. You can send the Eval Formula message to a column in case the data on which it depends have changed. You can turn automatic evaluation on or off with the Suppress Eval message to the data column or the Suppress Formula Eval message to the data table, which affects all the formula columns. You can send the Run Formulas message to the data table after turning evaluation suppression off. And you can send the Rerun Formulas message to the data table to force evaluation of all the columns, even if the data haven't changed. Finally, you might need to tell the data table to ignore errors that occur when evaluating a formula -- and this message can actually be sent to an individual column as well. There are three other properties that can be scripted using their own names: Range Check, List Check, and Value Labels. Unlike formulas, though, these could also be scripted as arguments to Set Property. The Range Check message takes special logical arguments that define the allowed or disallowed range of numeric values. In the generic syntax, the X is a placeholder for either an E or a T, where LE means less than or equal, and LT means less than. So the message to the column in the first example sets a lower bound of one and an upper bound of ten, and the bounds are inclusive, because we used LE -- less than or equal. The second example sets an upper bound of zero that is not inclusive, because we used LT. The values must be less than zero. Finally, because the syntax does not explicitly include an option for greater than or greater than or equal, you can use the logical function Not to set a lower bound. In the third example, the range check specifies that the values must be greater than or equal to zero, because that's the logical opposite of less than zero. The List Check message takes a list of the allowed values as it's argument. So this code indicates that the values yes and no are the only values allowed in this column. Finally, you can use the Value Labels message with a list of mappings from the data values to their labels as assignments. Value Labels are a way to change how the observations are displayed without overwriting the actual data values, and this property can be turned on or off. In this example, the message assigns the label Male to data values of and the label Female to data values of When Value Labels are turned on, the labels will be displayed in the data table and any reports, but when they're turned off, the data values will be displayed. The remaining column properties are all scripted using Set Property. The Set Property message takes the property name as a character string for its first argument, and the property value for its second argument. The property value could be a string, a number, or a list of values. So for example, the Spec Limits property includes several values so they're provided together in a list. For all of the column properties except formulas, your script can send the Get Property message to return the values of the specified property. So the example shown here returns the values that have been set for the Spec Limits property. And you can remove any column property with the Delete Property message.