Main Content

sfa_columnValue

Retrieves cell values from Safety Analysis Manager column

Since R2023b

Description

example

val = sfa_columnValue(label) retrieves the values from the column with the label, label in a spreadsheet in the Safety Analysis Manager. Use this operator only in the column formula of derived columns. The column formula applies the operator to each cell in the derived column. Each cell retrieves the value from the cell in same row.

Examples

collapse all

Suppose you have a table that has a text column labeled Text and a derived column labeled Derived. To access the cell values in the Text column and modify them in the derived column:

  1. Point to the right side of the Derived column.

  2. Click the arrow and click Edit Formula.

  3. In the Column Formula Editor window, add the code that retrieves the values. Use the sfa_derivedValue keyword to set the derived value cells to the retrieved values appended with the string " is satified.".

    textVals = sfa_columnValue("Text");
    sfa_derivedValue = textVals + " is satisfied.";

    The Column Formula Editor with the code.

  4. Close the Column Formula Editor window to save the code.

Input Arguments

collapse all

Column label, specified as a string scalar or character vector.

Example: sfa_columnValue("This Column") returns the cell values in the column labeled This Column.

Data Types: char | string

Output Arguments

collapse all

Cell value retrieved from the specified column, returned as a character vector.

Limitations

  • You cannot use this operator in the derived column formula to return self-referenced values. For example, in a derived column myDeriveColumn, setting the myDeriveColumn column formula to sfa_derivedValue = sfa_columnValue("myDerivedColumn"); is not supported.

Version History

Introduced in R2023b