Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
I'm trying to create an expression that simply takes a number (called 'shift') and returns a string like the following:
"This Shift ([shift])"
I tried creating an expression that takes 'shift' as an input and the expression code is simply:
"This Shift (" + shift + ")"
However, every time I try to create this expression, the expression code is empty the next time I open it and it doesn't actually work.
What version of Thingworx are you using?
What you are doing looks correct, maybe try: result = ... or ' vs "
I'm on 8.4.4.
I tried all combinations of using single quotes/double quotes and doing "result = " and none of that worked.
Are you using the new capability that is in the bottom right pane to create the expression?
The expression widget has been deprecated
I did try this and it was working fine for me, so I would file a ticket if it isn't working for you.
Yes, I'm using the expression pane, not an Expression Widget.
Hello @mdszy ,
It definitely looks like a good candidate for the Tech Support case. Meanwhile, just as a potential workaround suggestion -- try to export your Mashup as XML, modify the Expression code in the XML and import it back.
/ Constantine
Hi @mdszy ,If @Constantine response has answered your question, please mark as Accepted Solution, for the benefit of others who may have the same question.