INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Problem Copying Data from Existing Field into a New Field  (Read 2453 times)

Skeezix

  • Galactic Citizen
  • ****
  • Posts: 294
Problem Copying Data from Existing Field into a New Field
« on: June 20, 2016, 08:35:23 pm »

I have a field named "Last Played" in my list, and it is non-editable. So I made a new field and called it "Last Date Played". Then I clicked Tools>Options>Library and Folders>Manage Library Fields>Last Date Played and typed "Date" in the Data>Data Type field, put an "X" in "Save in file tags", and clicked OK twice. So far, so good.

I wanted to copy the data in Last Played to Last Date Played so I left-clicked the cell just below the Last Date Played name. I selected Move/Copy Fields and looked for a "Last Played" in the list shown in the Move/Copy Field dialog box but it was no longer there. Only my new field (Last Date Played) was in the list.

How do I make the source "Last Played"?

Logged
* HP Pavilion Desktop 510-p114
* Windows 10 Home 22H2 19045.5073
* Firefox 131; Thunderbird 115.15

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Problem Copying Data from Existing Field into a New Field
« Reply #1 on: June 20, 2016, 09:42:51 pm »

I selected Move/Copy Fields and looked for a "Last Played" in the list shown in the Move/Copy Field dialog box but it was no longer there. Only my new field (Last Date Played) was in the list.

It would never show up there. Probably because its Edit Type is "Clear only".

Normally you would have created the "Last Date Played" field in "Tools>Options>Library and Folders>Manage Library Fields" as well. Did you create it by adding it to a view?

Anyway, to get the contents of "Last Played" into "Last Date Played" just highlight the files you want to copy the date across for, then edit the "Last Date Played" field (rename), and insert the expression "=[Last Played]", without the quotes.

Note that the data will only be copied across if there is a date in the "Last Played" field. If the field has "never played" in it, that won't be copied across.

BTW, the "Last Played" field is automatically maintained by MC based on when you actually played a file. I understand if some files don't have the data and you want to have the information that you know in MC. But you are making a lot of work for yourself to maintain that field. I don't know of any way to update the original default field though.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9143
Re: Problem Copying Data from Existing Field into a New Field
« Reply #2 on: June 20, 2016, 10:01:37 pm »

I don't know of any way to update the original default field though.
http://yabb.jriver.com/interact/index.php?topic=59929.msg404889#msg404889
http://yabb.jriver.com/interact/index.php?topic=71717.msg484790#msg484790
http://yabb.jriver.com/interact/index.php?topic=97481.msg673835#msg673835
They all describe the same technique, only need to click on one. ;)
Those are for "date imported", but if you know the raw data you need, it will work the same for [Last Played] too.

Skeezix,
Why do you want this data copied?
I only ask because, you can create your own 'last played' field that automatically keeps up with the default, and so, you can specify different types of formatting for the date and time.
If you just want the data for historic reasons, that's fine, RoderickGI has you covered, but I can confirm, you won't be able to easily automate that process.

-marko

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Problem Copying Data from Existing Field into a New Field
« Reply #3 on: June 20, 2016, 10:16:13 pm »

Thank you Marko. I've saved one of those links now.  8)

Sometimes I don't ask "Why" and just describe "How".  ;D
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Problem Copying Data from Existing Field into a New Field
« Reply #4 on: June 21, 2016, 08:02:08 am »

Marko's linked threads are good for editing that particular type of field that's not supposed to be editable.

But what if you find yourself doing this all the time, or doing lots of little edits here and there?  There's a way to do this all without import or export.  Use the "triple variable technique".

You know how [Album Artist (auto)] takes either the value of [Album Artist] or [Artist] depending on which one is filled out?  You can make your own variables like this too.  In your case you'd make the following fields:

[Last Played (edited)] :  Date type field where you can enter your own dates.
[Last Date Played] :  Calculated field with a value of:
firstnotempty([Last Played (edited)], [Last Played])

Once that's done, you can display [Last Date Played] as the field to sort by or whatever.  Whenever you want to edit this value, you edit [Last Played (edited)] .  [Last Date Played] will automatically pick up that value.  If it doesn't exist, it will use [Last Played] instead.

It's the best of both worlds.

Brian.
Logged
Pages: [1]   Go Up