WorkWithPlus provides the possibility to delete an attribute from all the instances created within a KB. This is useful when we have an attribute that is being referenced in many transactions as an inferred attribute for example, and at a moment we do not need it any more (we avoid going through every instance's transaction and deleting it manually, which save us a lot of time).
It is important to know that this functionality will delete all the appearances of this attribute in all the Work With Plus instances as an attribute node, but it will not delete the indirect references to this attribute like when they have variables based on it, or filters for example.
To execute this functionality we must press Tools -> WorkWithPlus -> 'Delete attribute from all instances'
We will use attribute CompanyDescription as an example. As we can visualize below, this attribute is referenced by Company and Person Instances.
We visualize Person Instance:
We visualize Company Instance:
In Person's instance, it is being referenced by attribute nodes (in Transaction, Selection, Tabular Tab), but in the case of Company's instance CompanyDescription is referenced by attribute nodes within Transaction and Selection objects, and by a variable based on CompanyDescription as well as a filter. As we mentioned above, the variable and the filter will not be deleted automatically so user will have to do it manually.
Know we will execute the action:
Right after we click on the option to execute this action, the following window will open in order to select the attribute we want to delete:
We select 'CompanyDescription' and press Ok:
A confirmation message will be shown:
After we confirm the action, the output window shows in which instances the attribute was deleted, and if occurred some problem during the operation. In the example of CountryDescription, the attribute was successfully deleted from both instances, but as the variable and the filter was not deleted, a message is shown so that user is aware of the situation and can identify the instances that still have references to the attribute.
In some cases, a validation error can cause that an attribute cannot be deleted (for example, if an instance has a grid with only one attribute in it, and we try to delete it will could not do it). When this situation happens, a message will be displayed on output window, and user will have to open the instance and delete it manually resolving the conflicts.