cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Can localization be used in a Mashup Expression?

Timo697
13-Aquamarine

Can localization be used in a Mashup Expression?

I often use the Expression function in mashups to display a modified version of a property of a Thing. 

For instance:

 

output = DeviceName + " Description";  //DeviceName is a String Parameter

 

 

I am trying to add localization to my mashups and would like to be able to use a token for the " Description" text.  How can I do this?.

2 REPLIES 2
abjain
15-Moonstone
(To:Timo697)

@Timo697 You can try defining a session parameter with a default value as 'Description' and then that variable will be accessible in the mashups in the Session tab where you can bind it to your expression's input parameter.

Timo697
13-Aquamarine
(To:abjain)

What would I set the Base Type as?

 

I set it to String then wrote a localization token into the Default Value:    [[Test_Description]]

 

My code in the expression is now:

output = Device + " " + Description;

 

Now, the expression has an output of:    Device [[Test_Description]]

Announcements


Top Tags