Author Topic: Code replacements that populate multiple fields simultaneously?  (Read 3307 times)

Offline mwillson

  • Newcomer
  • *
  • Posts: 5
    • View Profile
Hi guys, is it possible to create a code replacement that fills out the 'Description', 'Persons Shown' and 'Personality' field all from the one code, but with the same code having two different variants?

Eg: I'd like to type my code replacement in the description field... /mjch/ = Michael Jordan of the Bulls

After I finish thyping the code replacement in the description is possible for the 'Persons Shown' and 'Personality' field to be populated with 'Michael Jordan, Chicago Bulls'

Any help appreciated. Cheers

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24731
    • View Profile
    • Camera Bits, Inc.
Re: Code replacements that populate multiple fields simultaneously?
« Reply #1 on: May 16, 2016, 08:09:26 AM »
Hi guys, is it possible to create a code replacement that fills out the 'Description', 'Persons Shown' and 'Personality' field all from the one code, but with the same code having two different variants?

Yes, absolutely.

http://wiki.camerabits.com/en/index.php?title=User_Manual_Flat_View#Multiple_Code_Replacement

Eg: I'd like to type my code replacement in the description field... /mjch/ = Michael Jordan of the Bulls

After I finish thyping the code replacement in the description is possible for the 'Persons Shown' and 'Personality' field to be populated with 'Michael Jordan, Chicago Bulls'

No.  You'd have to use one of the variants in the other fields.  There is no way to have the use in one field cause replacement in other fields.  Code Replacement doesn't "know" about any other fields than the one you're modifying.

If you want to automate this, you can put 'mjch' (or any other appropriate short player name) in some unused field while you're going through the images and then apply an IPTC Stationery Pad that looks up that unused field and uses it for the code.

So let's say you put mjch in the Transmission Reference field.  Then in the Caption field of the IPTC Stationery Pad you'd put /{transref}/, and into the Persons Shown field you'd put /{transref}#2/, and so on.

If you then want to clear out the Transmission Reference field you could apply another IPTC Stationery Pad to clear that one field.

-Kirk

Offline mwillson

  • Newcomer
  • *
  • Posts: 5
    • View Profile
Re: Code replacements that populate multiple fields simultaneously?
« Reply #2 on: May 16, 2016, 06:06:10 PM »
Thanks Kirk. Further to this, is it possible to remove words from the Personality field using code replacements, or some other tweaked code (not using find and replace)?

EG: If the Personality field has: Michael Jordan, Chicago Bulls, Magic Johnson, LA Lakers, Larry Bird, Boston Celtics is it possible to automatically delete just the team name, in this instance Chicago Bulls, LA Lakers, Boston Celtics

At the moment I currently have {persons} in the Personality field in my IPTC Stationery Pad, drawing the player name and team name from the Persons Shown field. Is there some kind of code or tweak that can remove the team name... EG {persons} {except: Chicago Bulls} {except: LA Lakers}{except: Boston Celtics}

In simple terms, I need my Persons Shown field to have player AND team name, but I need the Personaliy field to have ONLY player name. Just want the most efficient way of doing this.

Cheers

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24731
    • View Profile
    • Camera Bits, Inc.
Re: Code replacements that populate multiple fields simultaneously?
« Reply #3 on: May 16, 2016, 06:16:50 PM »
Thanks Kirk. Further to this, is it possible to remove words from the Personality field using code replacements, or some other tweaked code (not using find and replace)?

EG: If the Personality field has: Michael Jordan, Chicago Bulls, Magic Johnson, LA Lakers, Larry Bird, Boston Celtics is it possible to automatically delete just the team name, in this instance Chicago Bulls, LA Lakers, Boston Celtics

At the moment I currently have {persons} in the Personality field in my IPTC Stationery Pad, drawing the player name and team name from the Persons Shown field. Is there some kind of code or tweak that can remove the team name... EG {persons} {except: Chicago Bulls} {except: LA Lakers}{except: Boston Celtics}

In simple terms, I need my Persons Shown field to have player AND team name, but I need the Personaliy field to have ONLY player name. Just want the most efficient way of doing this.

Not that I know of.  Code Replacement is kind of like a find and replace feature but it's more dynamic.

A regular Find and Replace should be able to remove those terms from your Personality field.

-Kirk

Offline mwillson

  • Newcomer
  • *
  • Posts: 5
    • View Profile
Re: Code replacements that populate multiple fields simultaneously?
« Reply #4 on: May 17, 2016, 09:47:46 PM »
thanks kirk