MM_INSTANCEKEY function

Returns the label of the selected instance in a table.

Written By Son Nguyen (Administrator)

Updated at February 27th, 2023

Description

Returns the label of the selected instance in a table.

Syntax

=MM_INSTANCEKEY(["DefaultKey"])
  • "DefaultKey" (optional)
    Label/key returned by the function in Excel. This parameter is not used in Mind.

Remark

Instances have to be added beforehand on your project. To learn more about instances, check the introduction to instances‍.

Example

In the following example, the grid #Details of premiums per product is on the workbook Product x Guarantee. The instances of the model are defined by the following /InstanceKeys grid.

In this case, there are 8 versions of the table #Details of premiums per product corresponding to the 8 instances of the workbook Product x Guarantee. You can access each version of your grid through the drop down list on top of your grid.

On the first cell of the grid, the function MM_INSTANCEKEY returns the selected content in the drop down list (once the model has been calculated).

Note that the parameter inside the function is equal to "Product i x guarantee j". This is the value returned in Excel.