Use boolean value in string

2
Probably a very simple question: how do I use the value of a boolean in a string? I want to keep track of changes and make this human readable, so the result should be 'Old attribute value: false; new attribute value: true' I tried toString, but that only works for Float, Integer, DateTime or Enumeration. I tried simply 'Old attribute value: '+MyEntity/MyArgument+'; new ...', but then I get the error that it should be of type Integer, Float or String Thanks.
asked
2 answers
4

Joost

You will need to use some conditional statements, if you are setting an attribute value in a change activity in a microflow, it would look like this:

if OldAttributeValue = false then

   'OldAttributeValue: false'

else

   'OldAttributeValue: true'

If you want to have old value combined with new value, you'll need to use nested if then statements.

If you are building a string variable in your microflow, you could accomplish the same thing with Exclusive Splits

Hope that helps.

Mike

answered
0

You could use an 'if' statement, saying that if the boolean is true, then the string should 'true'.

answered