Organize View in Project Browser

Hi Community, I need some guidance…
Say I have 3 Levels…

  • Level 1
  • Level 2
  • Level 3

And I have 3 sub-folders, name A, B and C for this example…
So will have :

  • Level 1
  • Level 1 - A
  • Level 1 - B
  • Level 1 - C
  • Level 2
  • Level 2 - A
  • Level 2 - B
  • Level 2 - C
  • Level 3
  • Level 3 - A
  • Level 3 - B
  • Level 3 - C
    Then I need to sort them by folder in the project browser by “Sub-Folder” shared parameter. Those views without the " - X" value will not be moved. While those with " - X" value will be in each separate folder in the browser.

Am thinking keys will help so this is what i started…but how can I do that?

not sure i understand what you are after here but something like this ?

SortByKeys is a good option but the key would have to come from the value you want sorted (name in this case) because each element requires a key to be sorted by. You would have to get the subfolder value (A, B, or C) from the name.

Also, make sure you’re sorting the actual element that you want to write back to, not its name.

I want them to be organized this way…


I already have a code for duplicating the views and adding the value of the sub-folder parameter to the View Name…

Yes, I just link it to e.Name codeblock to show the names in the Preview…