Video Screencast Help
Protect Your POS Environment Against Retail Data Breaches. Learn More.

Select all resources.

Created: 04 May 2011 | 3 comments
AMakarenko@leta.ru's picture

I have necessary to select all resources for connecting to another assets. By using a ResourceAssociation "Associated Assets" i can celect by Select Reources advanced view a group resources. How i can make by "Enable edition form" in ResourceAssociation or another way make a ability to select all resources.
For connecting  400 assets to another asset now i necessary select by small group.

Comments 3 CommentsJump to latest comment

MagicGuru's picture

From your description I understand you were trying to link all your assets to a certain resource by using out-of-box resource association "Associated Assets". However, considering the number of your assets it may not be a best practice to do it your way. Associating such a sizable group of Assets via Resource Association will inevitably cause big performance issue.

Besides performance consideration, what if there is a new asset coming in and you will have to remember to add this new asset to this resource association as well?

Consider what your requirements are:

  1. Do you really need to display these associated assets directly?
  2. Do you need to add/remove these associated assets when the number of assets changed?

If answers to the first question is NO and the second is YES, then I'd recommend to implement this in a user defined data class:

  1. Create a new data class with a single column, whose content is a filter as Item Foreign Key of this data class.
  2. And add this data class to your Asset resource type.
  3. Create a filter which includes all the assets satisfying your requirements.
  4. Go to the Edit page for your selected asset, locate the newly added data class and select the filter you just created as its data.
MagicGuru's picture

 

The pros and cons of this approach:

The main benefit is performance. Instead of associating 400 assets, which is about 1MB on the page size and considerably slows down the loading of the Edit page for that asset, you will only need to maintain 1 single item which is the filter. For instance, All Computers filter will contain any computer you have in your system. It automatically adds and removes any computer discovered in your system.

The main drawback is inconvenience of displaying which asset has been associated. You no longer be able to use Resource Association Diagram or Grid to display the associated assets. But defining a virtual resource association could nicely solve this trouble.   

AMakarenko@leta.ru's picture

Filter is a good idea, but, as sad MgicGuru, i cant see a Resource Association Diagram with all this assets. May you say more about virtual resource association?