Skip to main content
3-Newcomer
October 28, 2024
Solved

Related to code

  • October 28, 2024
  • 4 replies
  • 1856 views
I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.2.11

My code runs with particular username it's self-working, but i want whole list of user more than 90days inactive user list and last login time both.

Here are the errors that I faced
My code runs with particular username it's self-working, but i want whole list of user more than 90days inactive user list and last login time both.
    Best answer by joe_morton

    Have you considered using query builder and adding a data monitor? As others stated, it would be helpful to understand what the end goal is. If you just need a report of inactive users, that can be done with query builder.

    4 replies

    avillanueva
    23-Emerald I
    23-Emerald I
    October 28, 2024

    This is not clear at all? What does the code do? Can you share more information?

    18-Opal
    October 28, 2024

    @avillanueva ,

    I think he’s asking that his code be able to list all users that have been inactive for 90 days or more.

    3-Newcomer
    October 30, 2024

    Yes, you are correctly understanding my Question, can you share for that you have any solution.  

    olivierlp
    Community Manager
    October 28, 2024

    Hi @SM_11005334 

    Thanks for entrusting your question to the PTC Community. Though it looks like you replicated one line in your question, perhaps by mistake. 

    To reinforce what @avillanueva and @d_graham said, it will be easier to get help if you give more details upfront about your use case, what you are trying to do and possibly some screenshots and piece of code to look at. Otherwise, other members will not know how to approach the problem. Here is some guidance: How to Ask a Good Question - PTC Community

    Looking forward to getting more details soon!

    Olivier
    joe_morton
    18-Opal
    18-Opal
    October 28, 2024

    Have you considered using query builder and adding a data monitor? As others stated, it would be helpful to understand what the end goal is. If you just need a report of inactive users, that can be done with query builder.

    18-Opal
    October 29, 2024

    I wrote a sql query to get users that have been inactive for X days.

    I also created Query Report per Joe's suggestion.

     

    The sql code is simple.

    The Query Report is quite decent as well, although familiarity with the Query Builder's UI is necessary.

     

    But you might want to do this in Java depending upon your end game.

    Speaking of end game, what is the end game?