Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi community,
I would like to ask that if anyone knows that how to iterate over the application keys which are existed in the platform without knowing anything like list of Application keys. Please let me know about it
for eg like GetKeyID(), GetExpirationDate(), ...
Thanks!
Here you go:
Resources["SearchFunctions"].SearchModelEntities({
types: {"items": ["ApplicationKey"]}
}).rows.toArray().map(row => row.name).forEach(key => {
let entity = ApplicationKeys[key];
logger.debug('AppKey ' + key + ': ' + entity.GetKeyID() + ', expiring on ' + entity.GetExpirationDate());
});
/ Constantine
thank you! i also found out one solution
var params = {
tag: undefined ,
nameMask: undefined ,
type: "ApplicationKey" ,
maxItems: 500
};
var result = Resources["EntityServices"].GetEntityList(params);
//select output as an infotable