|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
Synchronizing custom item templates between different DB files
Hi-
One of my applications of UR creates separate urd files, starting from a skeleton file and then doing "Save As." The database files contain 10-20 custom forms and item templates with many custom attributes. This system has evolved over the years, so some of the earlier urd files are different than the current skeleton file. The changes are mainly to the forms and attributes, but the collection of item templates has not changed much. What is the recommended strategy for keeping the structure of these files in sync? That is, how do I keep the attributes, forms, and item templates compatible? Is there a way to do a "diff" between two urd files, to see where their attributes, forms, and item templates are different? One technique I have experimented with is "drag & drop" of an item template between databases. This does not appear to update the attributes or forms of the target database. In fact, this has made me wonder how items derived from a custom template transfer to a different database via "drap & drop." Do both databases have to have the same item template name or do they have to have matching attributes? Any ideas & suggestions are welcome! -Stan |
#2
|
|||
|
|||
There is not a diff feature in UR.
If you create a template item with custom attributes and a form, and copy the template or an item of that template to another DB, the custom attributes and form will also be created in the destination DB. If you then modify the template and add more attributes, and copy the template or item of that template to the same DB as before, UR will add any additional attributes in the destination, but it won't modify the form or existing items with additional item attributes. But you could search for all items of that template, select all, and add the missing item attributes (and also add them to the form). |
#3
|
|||
|
|||
Quote:
This is the custom template in the source database: Two attributes of this template are custom: Hours (string) and Holdings (string); the rest are "built-in" attributes. After copying this template item to the template folder of the default db it displays like this: A repository Form is created but it does not have the Hours and Holdings attributes, although lines have been reserved for them. Also, the Attributes list does not contain Hours and Holdings. I used the Edit menu's Copy and Paste commands. Do I need to use a different procedure? Thanks for your help. |
#4
|
|||
|
|||
In my earlier test, I copied an item of the template, rather than the template item itself, but I tried that just now and also got the expected result.
|
#5
|
|||
|
|||
Thank you for taking a look at this.
I tried your sample and I found it works as you describe. To try to isolate the problem I am experiencing, I created a separate database with a custom Repository item type (as described in my previous post) and created two Repository items -- it is Repository-Sample.urd in the attached Zip file. For one of the Repository items, all Attributes are populated, for the "unpopulated" item, it only has an Item Title. I tried three tests:
The results that I see are:
These resulting databases are included in the zip file and are named CaseN....urd. It appears that a new Item type is not completely copied to a different database if any of its attributes are not assigned values. This is a fairly simple case. I wonder how a template Item type that contains references to other InfoItem types will transfer to a new database. Thanks, -Stan |
#6
|
|||
|
|||
They don't need to have a value, but the template item does need to have the custom item attribute(s). The mere existence of an attribute on a form will not bring the attribute over.
|
#7
|
|||
|
|||
Quote:
My approach has been to create forms with custom attributes. Then in the template item, I just give the name of the form used. I assumed the attributes were pulled into the new type. This worked until I tried copying items between databases. Maybe it has had other consequences that I'm not aware of. |
|
|