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

How to programmatically set tags to recent entities?

SOLVED
EM_9923519
9-Granite

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
12-Amethyst
(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
12-Amethyst
(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

abjain
12-Amethyst
(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.

Announcements