Skip to main content
Oct 19, 2022 6:59 PM UTC
Solved

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 

Oct 20, 2022 3:55 AM UTC

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);

1 reply

Oct 20, 2022 3:55 AM UTC

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);