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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Localization token retrieval

KT_10107318
6-Contributor

Localization token retrieval

Hi all, is there any way to retrieve the token name using the token values

There are multiple entry for token name which has same token value. For

 example ui.testpassed= test passed , also test_passed = test passed. Need to clean up duplicate

Thanks in advance 

1 ACCEPTED SOLUTION

Accepted Solutions

Not directly.. but you try workaround by...

  • Get all token names and values
  • Iterate or over the tokens
  • Or do aggregate with group by token values
let allTokens = LocalizationTables["<localization table>"].GetTokens();

let params = {
	t: allTokens /* INFOTABLE */,
	columns: 'value' /* STRING */,
	aggregates: 'COUNT' /* STRING */,
	groupByColumns: 'value' /* STRING */
};
let result = Resources["InfoTableFunctions"].Aggregate(params);

View solution in original post

1 REPLY 1

Not directly.. but you try workaround by...

  • Get all token names and values
  • Iterate or over the tokens
  • Or do aggregate with group by token values
let allTokens = LocalizationTables["<localization table>"].GetTokens();

let params = {
	t: allTokens /* INFOTABLE */,
	columns: 'value' /* STRING */,
	aggregates: 'COUNT' /* STRING */,
	groupByColumns: 'value' /* STRING */
};
let result = Resources["InfoTableFunctions"].Aggregate(params);

Top Tags