is there a way i can duplicate an item attribute to a new attribute. for example we want to duplicate the Dublin Core "Date" attribute to another new attribute copyofdate. Reason for doing this is, we have imported dates into Dublin Core Date field but these dates needs editing and formatting so we can use it to sort, but cannot afford to loose the original values and format.
please let me know if there is a way to do duplicate, it will be a great help!
This is similar to your earlier question about using the value of an existing metadata field to create derived metadata values (tags) for the item.
In this case, you want to create a derived value to be the sort value of the date.
Define a new Item Metadata Type named "Date-sort".
If you have a program created to run through all the items to get a metadata value and crack it into a list of tags to insert for the item, add a section to that program to do one more thing for each item. Get the Dublin Core Date field value and insert it into a Item Metadata Type Date-sort field. The code for doing this will use helper functions within the Omeka core.
An alternative approach for doing such work for each item is to do it outside of Omeka. Start with the existing information about each item in some form of text file (say a csv file) and process that file, transforming it to hold the new metadata field values desired and then do a CSVImport of that file into Omeka. By working with text files, you can find many samples of PHP code that do such work. Shell scripting tools such as awk or perl can be used as well.
If the derived values are just copies, you can use excel to duplicate columns without having to use any custom written program.
CSVImport is set up to expect one field to be holding multiple tag values for each item, and it imports data into any Item Metadata Type field that you have defined as well as into the Dublin Core metadata fields.
The duration for running the CSVImport is an issue when there are many items, each having image files, but it's not that bad. It's a few hours for 3000 items on my server.
In the previous post, I was not precise when
saying to define a new Item Metadata Type. It's not a type, it's an element.
Define a new Item Metadata Element named "Date-sort" and have it belong to an existing Item Metadata Type or create a new Item Metadata Type to hold it.