@thecoder2012 @Timo @Plankton @ulrich
I need a solution to replace multiple value in same macro code
I made an example:
I have a csv with the number of months from 1 to 12 sometime I need to replace in some macros the number of month with the month’s name example for 1 I need to use in the macro January, for 2 I need to use in the macro February, for 12 I need to use in the macro December.
I can replace 1 single value, exist a better solution to replace multiple value in same times in the macro code ?
My variable values
1
2
3
4
5
6
7
8
9
10
11
12
Replaced in
January
February
March
April
May
June
July
August
September
October
November
December
actually for 1 single replacement i use this code
{
“Name”: “replace_variable”,
“CreationDate”: “2019-12-9”,
“Commands”: [
{
“Command”: “store”,
“Target”: “1”,
“Value”: “Var1”
},
{
“Command”: “if_v2”,
“Target”: “${Var1} == "1"”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “January”,
“Value”: “Var1”
},
{
“Command”: “echo”,
“Target”: “${Var1}”,
“Value”: “#shownotification”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”
}
]
}
To replace all months i need 12 if condition, exist a simple solution ?
Thanks