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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Update Home Mashup for users in bulk

SriKrishna
5-Regular Member

Update Home Mashup for users in bulk

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.

ACCEPTED SOLUTION

Accepted Solutions

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 

View solution in original post

2 REPLIES 2

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 

Thank you for your clear answer.

8 ball pool

Announcements


Top Tags