Author Topic: Default replacement into variable if source is null.  (Read 1444 times)

Offline Chrish_Photos

  • Newcomer
  • *
  • Posts: 9
    • View Profile
Default replacement into variable if source is null.
« on: February 16, 2022, 02:28:00 AM »
Here's hoping someone can help.

I'm adding rider names into the {person} field of my images, then at the end of the naming process applying a template using the following code to copy that person info into my captions. It works perfectly as you'd expect.

{persons} during race 1 of the {event} held at {location} near {city} in the {state} of {country} on {day0} {monthname} {year4}.

What I want to have it do is enter the default word 'Riders' into the caption if that field is null in the {persons} field.

I know I can do it with a delimiter in the code replacement panel but that means I have to type \\ into every {person} field in every image that doesn't have a name rather than just skip past them and let the template do the hard lifting.

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 766
    • View Profile
Re: Default replacement into variable if source is null.
« Reply #1 on: February 16, 2022, 09:19:06 AM »
I see that you got some replies to this question in the Facebook user group. Hopefully the suggestions that you got help you achieve this, but let us know if you have further questions.