Author Topic: Multi-field code replacement codes to manage duplication of information  (Read 69 times)

Offline Claude Diderich

  • Member
  • **
  • Posts: 79
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
I have often the challenge that I enter information in the caption field, typically generated via code replacement, that I need to duplicate in other fields, like keywords or person shown fields. This is very tedious.

Assume = is the code replacement separator. What would be very helpful if I could enter a code replacement code in one field that would add/change the content of another field. Such a code replacement code could look like =code#field= and would evaluate to adding =code= to the field field (if it is a list) or replacing the content of field field by =code=, if =code= evaluates to something, otherwise add to/replace with code.

Here is atypical code replacement example and its use

Code replacement file cr.txt:
a01 Donald Duck
+a01 =a01= of team Disney=a01#persons=


Enter in the caption field:
=+a01= is playing with a ball=Ball#keyw=

Result
caption field: Donald Duck of team Disney is playing with a ball
persons field: Donald Duck
keyword field: Ball
Claude Diderich, sports photographer, member of AIPS and sportpress.ch

Offline alexmacnaughton

  • Member
  • **
  • Posts: 68
    • View Profile
Hi Claude,

Couldn't you get the same result using Hot Codes?

Offline Claude Diderich

  • Member
  • **
  • Posts: 79
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
Unfortunately no. Hot codes, to my understanding is for alternatives, i.e., use A and if this does not exist use B. What I am looking for is populating a field, e.g. FIELDA, with data when entering that said data in FIELDB, e.g., I enter the name of a player in the CAPTION field and that acts as if I had entered in the PEOPLE field without having to switch between fields.
Claude Diderich, sports photographer, member of AIPS and sportpress.ch

Offline Kevin M. Cox

  • Hero Member
  • *****
  • Posts: 569
  • 2025.1 (8239) | macOS 15.5
    • View Profile
    • Kevin M. Cox | Photojournalist
Kevin M. Cox | Photojournalist
https://www.instagram.com/kevin.m.cox/