Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi,
I have a requirement where I need to update the Home Mashup and Mobile mashup for all the users. There are about 1000 users which I need to update this. Is there a way for updating these in bulk (ex: back end update from Postgresql )
Regards,
Srikrishna Kanth.
Solved! Go to Solution.
Hello @SriKrishna,
No need to go into Postgres, a simple service will do it:
var users = Resources["SearchFunctions"].SearchPeople({}).commonResults;
for (var i = 0; i < users.length; ++i) {
var user = Users[users[i].name];
user.SetHomeMashup({ name: "MyMashup" });
user.SetMobileMashup({ name: "MyMashup" });
}
Regards,
Constantine
Hello @SriKrishna,
No need to go into Postgres, a simple service will do it:
var users = Resources["SearchFunctions"].SearchPeople({}).commonResults;
for (var i = 0; i < users.length; ++i) {
var user = Users[users[i].name];
user.SetHomeMashup({ name: "MyMashup" });
user.SetMobileMashup({ name: "MyMashup" });
}
Regards,
Constantine