Topic
8 replies Latest Post - ‏2012-12-19T13:27:46Z by mcnairk
mcnairk
mcnairk
107 Posts
ACCEPTED ANSWER

Pinned topic Deleting multiple views from multiple modules

‏2010-04-16T14:59:12Z |
I created a bunch of views in one module and propagated them to numerous other modules using the excellent CopyView DXL. However, I was a bit too enthusiastic and now have several unrequired views that need to be deleted from all modules.

Has anyone developed a DXL that can do this, preferably one with a nice interface that allows you to pick the modules and views. I could hack CopyView, but I hate to re-invent the wheel...

Many thanks,
Ken.
Updated on 2012-12-19T13:27:46Z at 2012-12-19T13:27:46Z by mcnairk
  • Bob_Swan
    Bob_Swan
    31 Posts
    ACCEPTED ANSWER

    Re: Deleting multiple views from multiple modules

    ‏2010-04-21T07:12:57Z  in response to mcnairk
    Attached is my effort for this task. It may make a starter for you.
    It was written to delete specific views from modules being shared with stakeholders.
    Sorry there is no 'nice interface', it was a one off for a dedicated task.
    You have to detail the views within the code, it then deletes them from all modules in the current project.
    It shouldn't be too hard to add some code to exclude specific modules.
    • mcnairk
      mcnairk
      107 Posts
      ACCEPTED ANSWER

      Re: Deleting multiple views from multiple modules

      ‏2010-04-21T17:50:43Z  in response to Bob_Swan
      Bob,

      With the following tweaks, I was able to get your DXL to do exactly what I needed.
      • Hard code killist of views to be deleted (obviously)
      • Comment out procedure "MakeMinView" (not needed by me)
      • Only process modules in current folder rather than entire project

      I noted the following issues:
      • User must be logged on as the Administrator so they have write access to all views
      • The comment describing "ReportRemainingViews" seems incorrect; this procedure actually reports the remaining views in the module

      I added the following to the wish list:
      • offer option to only process current folder (hard coded in my version)
      • create new log file for each run (e.g. append date/time stamp) rather than overwriting it
      • explicitly state in log if the view does not exist
      • explicitly state in log if the view could not be deleted

      Many thanks,
      Ken.
      • llandale
        llandale
        2943 Posts
        ACCEPTED ANSWER

        Re: Deleting multiple views from multiple modules

        ‏2010-04-21T19:43:02Z  in response to mcnairk
        Its not just that the Administrator can delete views, its also that the Administrator can even SEE them. 'Private' views are invisible to everybody except the user and the Administrator.
        • mcnairk
          mcnairk
          107 Posts
          ACCEPTED ANSWER

          Re: Deleting multiple views from multiple modules

          ‏2010-04-21T20:10:09Z  in response to llandale
          Thanks for the clarification.
          • mcnairk
            mcnairk
            107 Posts
            ACCEPTED ANSWER

            Re: Deleting multiple views from multiple modules

            ‏2010-04-21T20:16:15Z  in response to mcnairk
            I forgot to mention that if you provide an empty kill list, this DXL will simply log all views in all formal modules, which is useful in itself. I found a lot of junk views that I was not aware of...
            • SystemAdmin
              SystemAdmin
              3180 Posts
              ACCEPTED ANSWER

              Re: Deleting multiple views from multiple modules

              ‏2012-12-18T19:15:59Z  in response to mcnairk
              Ken,
              Thank you for providing notes on your edits. Is it possible to post your new version? I realize I am responding to messages that are two years old, however, it is worth asking. :)