HOWTO: Identify files checked out to a user?

  • 10 July 2019
  • 4 replies
  • 20 views

Hi All-

 

I'm looking for a way to run a report to find all files checked out to a specific user.  I'm assuming that the only way is to query the K2 DB but not sure where to start.  Any pointers?

 

Thanks in advance!


4 replies

Good day Jef,


 


I believe the best way to start is by querying the "Form.Form" table in the K2 SQL it will display the user who checked out the form. This will work if you refer your files as "Forms". please see the query in the Spoiler below:



 


SELECT TOP (1000) [id]


      ,[TypeID]


      ,[Name]


      ,[DisplayName]


      ,[CreatedBy]


      ,[CreatedDate]


      ,[ModifiedBy]


      ,[ModifiedDate]


      ,[IsCheckedOut]


      ,[CheckedOutBy]


  FROM [K2].[Form].[Form]


  Where CheckedOutBy = 'K2:DENALLIXAdministrator';




 


Kindly feel free to mark as “Accepted solution, kudo and/me too


If you find this information answered your question or leads to your answer.


Thank you and kind regards,


Dumisani


K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member.


 


  

Good day Jef;


 


In addition to @dumi, the simple way would be to execute this select statement against k2 database:-


(SELECT * FROM [K2].[Form].[Form]


WHERE MODIFIEDBY = 'K2:DENALLIXAdministrator';)



Please see related information---let's assume you want to know the user who checkin/out forms and forcefully checkedin/out on behalf of the user,


kindly dive into this link:-(https://grok.lsu.edu/article.aspx?articleid=17469&printable=y)


 


Additional information you might find usefu, Undo Checkout of smartforms with Stored Procedure.
1. select * from [k2].[Form].AuditLog


2. Note: the UserID is the fully qualified name (FQN) for the user that has the form checked out.
3. (https://discovertechnologies.com/blog/undo-checkout-smartforms-stored-procedure/)


 


Kindly feel free to Mark as "Accepted Solution, Kudo and/or MeToo" if you find this information answered your question or leads you to the answer.


 


Thanks & Regards;


Widson.

Userlevel 4
Badge +13

Hi Jef,


 


Please have a look at this KB article: https://help.k2.com/support-services/kbt150389


You can make use of the select queries on Step 1 to retrieve the Views and Forms that are currently checked out by a certain user.


 


Cheers,


Kimberly


 


K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member.


 


 

Badge +9

Hi Jef


 


Again, this is directly manipulating the Database, so please take a full backup prior to doing this.
I'm using an example user and ID below. Please change as necessary.


 


Step 1: get the info.
--For checked out views
SELECT ID, DisplayName, CheckedOutBy
FROM Form.View_Design
WHERE CheckedOutBy = 'K2:yourdomainNameUserName'; (e.g 'k2:denallixAdministrator'; )


 


--For checked out forms
SELECT ID, DisplayName, CheckedOutBy
FROM Form.Form_Design
WHERE CheckedOutBy = 'K2:domainNameUserName'; (e.g 'k2:denallixAdministrator'; ) 


 


Regards


Elvis

Reply