I need the value of a parameter (value that is inserted by a shape in visio) to be automatically set in another parameter of the same element. By protocol these parameters are in the same column of the table, but in different lines. Values are numbers in the format (xxxx.x eg 3665.5)
I tried for correlation from input value, but I couldn't get this value to be set in the other parameter.
can you help me? If possible send me print screen
Hi Kaio,
A possible way to implement this action is to use in an overview:
- A session variable that will contain the value to be set on the parameters
- A button that will be used to execute an automation script. The script will perform the set on both cell using the same value
The first shape (session variable) is defined as follows:
You can find more information about session variables in DataMiner Help (Turning a shape into a control to update a session variable)
The second shape (that will be represented as a button) is defined as follows:
Script:TEST_SET_PARAMETER|myDummy=TEST_ELEMENT_01|myValue=[var:mySessionVariable]||A nice tooltip|NoConfirmation
where:
- Script:TEST_SET_PARAMETER -> Name of automation script
- myDummy=TEST_ELEMENT_01 -> Element name where you plan to perform the multiple set
- myValue=[var:mySessionVariable] -> This is a placeholder that will be replaced with the value set in your previous shape (the session variable)
The other values are optional. However, please keep in mind that you will need to use all the separators. For example, this option will also work:
Script:TEST_SET_PARAMETER|myDummy=TEST_ELEMENT_01|myValue=[var:mySessionVariable]|||
You can find more information about executing automation scripts from an overview in DataMiner Help (Linking a shape to automation script)
The automation script should look like as follows:
ScriptParam myScriptParam = engine.GetScriptParam("myValue");
ScriptDummy myDummyElement = engine.GetDummy("myDummy");
myDummyElement.SetParameterByPrimaryKey(2003, "INDEX.1", myScriptParam.Value);
myDummyElement.SetParameterByPrimaryKey(2003, "INDEX.2", myScriptParam.Value);
where:
2003: Column parameter ID where I will perform the set.
INDEX.1, INDEX.2: Primary keys of the rows where I will perform the set