Table maintenance on useless/unused/obsolete fields

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

Greetings,

This is an odd question.  Is there a way to create a report, or anything similar, about all the fields in a table and see which of them was used and the last date of usage?

I would like to do some clean up in a table that has over a thousand fields which I'm pretty sure there might be some duplicated fields with another name or simply we don't use it anymore.

Photo of Ricardo Tsai

Ricardo Tsai

  • 40 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
Using script and the API you could process each saved report and count how many times each field was used. This will not reveal when any report was used but will give an indication of which fields are not used in any report. This isn't a perfect solution but it would be a lot faster than review g each of the 1000 fields in the application.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,064 Points 20k badge 2x thumb
I was at a conference on a table and did not look at this question closely enough when i answered. I see now that on the ?a=ReportList page there is actually a date and count listed for each report. Also there is a global variable named gReportsRaw that holds the raw data for the report. Try this in the console:

console.table(gReportsRaw)

So this means a simple script can access gReportsRaw and then iterate over each report and obtain the clist of fields the report incluses. But it all together and you can easily create a report of unused fields in a table. I will put it on my todo list to show an example but i am about to leave for the last day of my conference.
Photo of Ricardo Tsai

Ricardo Tsai

  • 40 Points
Hi, I'm sorry for this stupid question but how do I access the "console"?
Photo of Ricardo Tsai

Ricardo Tsai

  • 40 Points
This approach can at least shape off some search 1 by 1 hours. How would that script would look like?