You can use the conditional expression (not sure what it is called). Syntax is Locals.variable=(BooleanExpression?ValueIfTrue:ValueIfFalse). To implement your pseudo code it would look like this:
Locals.PromptMessage=(Locals.LoopIndex==1?"string1":"string2")
This means the same as:
If Locals.LoopIndex=1 then
Locals.PromptMessage = "string1"
Else
Locals.PromptMessage = "string2"
End If
Another way to do it is like this, but the first method is preferred:
Locals.LoopIndex==1?(Locals.PromptMessage="string1"):(Locals.PromptMessage="string2") -- must use parenthesis as shown
This syntax is BooleanExpression?(Statement if BooleanExpression is true):(Statement if BooleanExpression is false)
You can nest the expression to create ElseIf conditions:
Locals.PromptMessage=(Locals.LoopIndex==1?"string1":(Locals.LoopIndex==2?"string2":"string3"))
This means the same as:
If Locals.LoopIndex=1 then
Locals.PromptMessage = "string1"
ElseIf Locals.LoopIndex=2 then
Locals.PromptMessage = "string2"
Else
Locals.PromptMessage = "string3"
End If
I don't know if there is a limit to the nesting.
Hope this helps.