Is this possible to do without having to right click on the folder itself, and bringing up the properties window?
Is this possible to do without having to right click on the folder itself, and bringing up the properties window?
So this is just a shot in the dark but assuming a few things are true you might be able to get workflow to do this for you. Again this is a shot in the dark.
So we need to assume two things for this to work.
1.) That the Child Documents data is stored in the DB somehow tied to the LF Entry ID of the folder.
2.) That you can figure out the schema well enough to pull that info via a SQL Query.
The workflow might look like this...
1. Find all Folders in DB.
For Each Entry
2. Retrieve Entry ID.
3. Use entry ID to lookup Child Documents value by using the Entry ID.
4. Attach template to each result. (This template could be called Child Documents or something like that and it would only really need one field.)
5.) Update that field with the lookup result.
Once your run it the first time the workflow might change to not attach but just update.
Then adjust your view in the client to include that template field as a column.
Challenges:
1. How often would you run this? After all documents are moving around and you would want it to update on some type of schedule.
2. This would run on every folder... WOW for big DBs this would mean processor time etc. Might be better is you only needed it on one set of folders.
Someone from LF might need to verify that this would work but I think the logic is sound.
John
Might be easier to do with an SDK script that gets the folder statistics rather than counting things in the SQL tables. But you are absolutely right that it would be really expensive to recalculate across any reasonably sized repository if it is expected to be done in (near) real-time (which is why the Client does it on-demand, one entry at a time).
What is the use of seeing this information for all folders?
This approach can work, as far as it goes. What it doesn't take into account is that entries contained in a folder can have their visibility restricted on a per-user basis. This means that any attempt to provide a single value for a folder runs the risk of revealing the existence of entries a user shouldn't be aware of. This is the primary reason this value isn't available as a column in the listing - calculating it properly requires evaluating access rights for every entry in every folder, which is potentially an expensive operation.
Great point Miruna and Brian!