You have been bitten by the bug that adds a carriage return in the set value! You can see it in your first screentshot. Nasty little bugger.
Here is what works.
Here’s the contents of the api test:
{
"name": "repeat",
"module": "core",
"action": "repeat",
"options": {
"repeat": 3,
"outputFields": [],
"exec": {
"steps": [
{
"name": "local_repeat_val",
"module": "core",
"action": "setvalue",
"options": {
"key": "global_repeat_val",
"value": 1
},
"meta": [],
"outputType": "number"
},
{
"name": "",
"module": "core",
"action": "while",
"options": {
"while": "{{global_repeat_val==1}}",
"exec": {
"steps": [
{
"name": "repeat_index",
"module": "core",
"action": "setvalue",
"options": {
"value": "{{'Repeat index: '+$index}}"
},
"meta": [],
"output": true,
"outputType": "text"
},
{
"name": "reset_global_repeat_val",
"module": "core",
"action": "setvalue",
"options": {
"key": "global_repeat_val",
"value": 0
},
"meta": [],
"output": true,
"outputType": "number"
}
]
}
}
}
]
}
},
"output": true,
"meta": [
{
"name": "$index",
"type": "number"
},
{
"name": "$number",
"type": "number"
},
{
"name": "$name",
"type": "text"
},
{
"name": "$value",
"type": "object"
}
],
"outputType": "array"
}