Kinook Software Forum

Go Back   Kinook Software Forum > Ultra Recall > [UR] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-28-2022, 01:34 PM
smitchell smitchell is offline
Registered User
 
Join Date: 07-31-2022
Posts: 10
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
Reply With Quote
  #2  
Old 11-01-2022, 01:10 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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).
Reply With Quote
  #3  
Old 11-01-2022, 03:14 PM
smitchell smitchell is offline
Registered User
 
Join Date: 07-31-2022
Posts: 10
Quote:
Originally Posted by kinook View Post
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.
I tried creating a default database to which I copied one of my custom templates.
This is the custom template in the source database:

Name:  Custom-Item.jpg
Views: 219
Size:  33.7 KB

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:

Name:  Custom-Item-after-copy.jpg
Views: 224
Size:  28.6 KB

A repository Form is created but it does not have the Hours and Holdings attributes,
although lines have been reserved for them.

Name:  Custom-form-after-copy.jpg
Views: 134
Size:  43.1 KB

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.
Reply With Quote
  #4  
Old 11-05-2022, 07:05 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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.
Attached Images
   
Attached Files
File Type: zip Test.zip (158.1 KB, 152 views)
Reply With Quote
  #5  
Old 11-07-2022, 01:05 PM
smitchell smitchell is offline
Registered User
 
Join Date: 07-31-2022
Posts: 10
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:
  • Case 1 - Copy fully-populated Repository item to Root of a new default db.
  • Case 2 - Copy Repository Item template to Templates folder of a new default db.
  • Case 3 - Copy unpopulated Repository item to Root of a new default db.

The results that I see are:
  • Case 1 - works as expected, form, attributes, and template are correct.
  • Case 2 - custom attribs are not copied, form&template are missing custom attribs.
  • Case 3 - custom attribs are not copied, form&template are missing custom attribs.

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
Attached Files
File Type: zip Repository-Tests.zip (323.8 KB, 153 views)
Reply With Quote
  #6  
Old 11-13-2022, 05:50 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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.
Reply With Quote
  #7  
Old 11-15-2022, 12:54 PM
smitchell smitchell is offline
Registered User
 
Join Date: 07-31-2022
Posts: 10
Thumbs up

Quote:
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.
Thank you -- that is what I was missing.

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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 01:24 PM.


Copyright © 1999-2023 Kinook Software, Inc.