• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I need a script that writes a variable to the Job Identifier metadata field for the selected image(s).

New Here ,
Jun 04, 2015 Jun 04, 2015

Copy link to clipboard

Copied

Background:

I work in an organization that serializes an image using a common format. For example:

AB01-2015-0123-999.jpg

The codes in that string are informational. if I were to break it down it works like this:

AB = Office Code

01 = Photographer Number

2015 = Year

0123 = Work Order Number (like an invoice number)

999  = Frame Number (in the old days this was the frame number on a roll of film, now it is just sequential based on shooter selection)

Altogether this is known in our organization as an Image Number. Anyone in our organziation can identify by looking at the filename which office shot the image, which photographer, what year, which job it is associated with and which image in the series shot for the job it is.

As we use metadata extensively it is beneficial to take that information and add it to relevant metadata fields. Our internal spec thus demands that we take the Image Number and add it or parts of it to various metadata fields. For example:

Title: Image Number

Job Identifier: Work Order Number

I have gotten a good portion of a  script from Paul Riggott to work so that it uses to write to the Title metadata field, and I would like to add the ability to write the write the job Identifier field. I can construct the variable but I have no idea how to tell it what field to write it to. At the moment this is working:

md.Title = ImageNum;

But this is not:

md.JobIdentifier = WorkOrderNum;

TL;DR Question:

How do I write to the job identifier field?


Thanks!

Message was edited by: Shawn Kent (Couldn't get full code to display on work computer (outdated version of IE))

TOPICS
Scripting

Views

327

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 04, 2015 Jun 04, 2015

Copy link to clipboard

Copied

LATEST

This is an example of reading and writing to that field.

var thumb = app.document.selections[0];

var md = thumb.synchronousMetadata

md.namespace = 'http://ns.adobe.com/photoshop/1.0/';

var JobIdentifier = md.TransmissionReference;

$.writeln(JobIdentifier);

md.TransmissionReference = "new text";

$.writeln(md.TransmissionReference);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines