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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Set localization table programatically.

VR_10133499
14-Alexandrite

Set localization table programatically.

Hi,

 

1) Is there any way we can create a service to upload tokens to a localization table?

2) Is there a way to manage localization table in a better way instead of adding each token manually?

3) Also how do we use locations inside the service?

ACCEPTED SOLUTION

Accepted Solutions

1. you can use LocalizationTables[<table_name>].AddToken({name: '', value: ''});

2. You can create a UI to manage your tokens.

3. Are you saying how to get a token value in service? You can use one of following services, based on your need,

 

BP_9210462_0-1705409329176.png

 

View solution in original post

3 REPLIES 3

1. you can use LocalizationTables[<table_name>].AddToken({name: '', value: ''});

2. You can create a UI to manage your tokens.

3. Are you saying how to get a token value in service? You can use one of following services, based on your need,

 

BP_9210462_0-1705409329176.png

 

Thanks for the response.

All the responses are helpful.

 

Is there any documentation where i can get list of all such services, for e.g. some kind of documentation which i can refer and know that i can use something like LocalizationTables[<table_name>].AddToken({name: '', value: ''}); ?

Hi @VR_10133499,

Documentation per se is available here: https://support.ptc.com/help/thingworx_hc/javadoc/com/thingworx/resources/localization/RuntimeLocalizationFunctions.html

However typically we don't go there if we try to use those services, simply because the service editor in the ThingWorx Composer gives easy access to the services, in the Snippet section in this case, as @Bikash_Panda shared already. Hovering on them gives the exact explanations in the link above.

However, in addition to the Snippets, you can also choose to see in the "Me/entities" all the services of all the entities in the platform - also for Localization Tables.

These are features of the ThingWorx Composer that were in the platform since the beginning, and are crucial to know and use to have maximum efficiency.

VladimirRosu_0-1705521779423.png

 

Announcements


Top Tags