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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to programmatically set tags to recent entities?

EM_9923519
12-Amethyst

How to programmatically set tags to recent entities?

Hello, I want to tag with "Recent tag" the last modified entities I have used

How to do this using a script?

 

What I was thinking is 

query all entities and if they have been used inside a date range, then execute a service to tag them

Please share some sample code to accomplish this task.

1 ACCEPTED SOLUTION

Accepted Solutions
abjain
13-Aquamarine
(To:EM_9923519)

@EM_9923519 : You can try using SpotlightSearch service which is present inside SearchFunctions resource .It gives list of all entities along with last modified date. This service can be used inside your custom service where you can provide date range and can also sort by lastmodifieddate with ascending or descending order. Please also refer this article: https://www.ptc.com/en/support/article/CS180125

 

View solution in original post

2 REPLIES 2
abjain
13-Aquamarine
(To:EM_9923519)

@EM_9923519 : You can try using SpotlightSearch service which is present inside SearchFunctions resource .It gives list of all entities along with last modified date. This service can be used inside your custom service where you can provide date range and can also sort by lastmodifieddate with ascending or descending order. Please also refer this article: https://www.ptc.com/en/support/article/CS180125

 

abjain
13-Aquamarine
(To:abjain)

@EM_9923519 :If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

Top Tags