Configure parameters
6 min
a parameter is a named variable that you define in a litmus edge (le) model and set separately in each instance parameters let one topic expression resolve to a different topic for every instance built from the model, which saves you from defining a topic per attribute per asset this topic shows you how to create a parameter, use it in a topic expression, and set its value for an instance for the rest of the model, see create and configure a model docid\ zpadx1lmme0f44v7r6v6q before you begin before you configure parameters, ensure you have a model with at least one dynamic attribute note also see digital twins docid\ xlj3gvozyg 52ue4pb5u7 for overview and background information how a parameter resolves define a parameter named device , then use it in a dynamic attribute's topic expression devicehub alias {device} temperature each instance sets its own value for device , so the expression resolves to the tag that belongs to that machine one expression in the model serves every instance note parameter names and values are case sensitive and cannot contain spaces allowed characters are uppercase and lowercase letters (a–z), digits (0–9), hyphens ( ), and underscores ( ) create a parameter to create a parameter in the model open the parameters tab and then click add item enter a parameter name and a placeholder value click save row use a parameter in a topic expression a parameter takes effect only when a dynamic attribute references it to reference a parameter open the dynamic attributes tab click the edit icon for the attribute enter a topic expression that combines static text with the parameter name in curly brackets, for example devicehub alias {device} temperature click save instance note when a dynamic attribute has a topic expression, its topic is read only in the instance to change the topic, edit the expression here or change the instance's parameter value set the value for an instance each instance supplies its own value for every parameter the model defines to set the values select the instance and then click open parameters the instance parameters dialog appears set the value of each parameter for this instance navigate to the instance dynamic attributes page and confirm that each topic expression resolved to the topic you expect verify the parameter resolves to confirm a parameter is working open the instance's dynamic attributes tab and check that the topic shows the resolved value rather than the {parameter} placeholder open the data access tab and subscribe to the instance topic confirm that the attribute carries data from the asset the parameter points at related topics digital twins docid\ xlj3gvozyg 52ue4pb5u7 create and configure a model docid\ zpadx1lmme0f44v7r6v6q configure transformations docid\ tbkp rlu3ocbdjcnjy4lq add an instance docid\ jzoth4t0hcrtrauusdryk model and instance actions docid\ hk0idxlg7zcoetajwcobo