Skip to main content
1-Visitor
October 9, 2019
Question

Expression code not saving

  • October 9, 2019
  • 2 replies
  • 2739 views

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. 

2 replies

22-Sapphire I
October 10, 2019

What version of Thingworx are you using?

What you are doing looks correct, maybe try: result = ... or ' vs "

mdszy1-VisitorAuthor
1-Visitor
October 10, 2019

I'm on 8.4.4.

 

I tried all combinations of using single quotes/double quotes and doing "result = " and none of that worked.

18-Opal
October 13, 2019

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

5-Regular Member
December 9, 2020

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.