question

Mischa Spelt avatar image
0 Likes"
Mischa Spelt asked Phil BoBo edited

String expression in Assign Labels

When I enter a string expression such as "Hello " + "World" in Assign Labels, it is not parsed correctly: the label is assigned the value

  1. Hello " + "World

As a workaround, I can put the expression in brackets. Then suddenly FlexSim considers it a script and shows the "Code editor" button to the right of the field, and everything works as expected with a label value of

  1. Hello World

Sample model: AssignLabelsConcatStrings.fsm

FlexSim 20.2.2
flexsim 20.2.2assign labelsstrings
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered Phil BoBo edited

Yes, that field assumes that if the first character is a quotation mark, that you are entering a string.

As you did, if you want to evaluate it as code, then wrap the expression in parentheses.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.