Author Topic: variables - UC modifier  (Read 3037 times)

Offline Matthew

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • matt-horwood.com
variables - UC modifier
« on: December 29, 2020, 06:54:45 AM »
Hello,

I use the UC modifier as below to ensure that the city, state and month are capitalised.

{city:UC}, {state:UC} - {iptcmonthname:UC} {iptcday0:UC}: XXX on {iptcmonthname} {iptcday0}, {iptcyear4} in {city}, {state}.

This doesn't seem to be working on the latest version of PM6 or on PM6 Plus.

Is there a new modifier that needs to be used or is this a bug?

Thank you,

Matthew

Offline Rguzmanphoto

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: variables - UC modifier
« Reply #1 on: December 29, 2020, 07:50:54 AM »
Hello,

I use the UC modifier as below to ensure that the city, state and month are capitalised.

{city:UC}, {state:UC} - {iptcmonthname:UC} {iptcday0:UC}: XXX on {iptcmonthname} {iptcday0}, {iptcyear4} in {city}, {state}.

This doesn't seem to be working on the latest version of PM6 or on PM6 Plus.

Is there a new modifier that needs to be used or is this a bug?

Thank you,

Matthew

Thanks for bringing this up I use this also

I just looked back to this past Sundays game and it seems to be not working on PM6 Ver 5404 or PM6+ Ver 5438.  I just went back to PM6 Ver 5378 and this is working again. I haven't tried going back in PM6+ yet.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: variables - UC modifier
« Reply #2 on: December 29, 2020, 09:56:03 AM »
Matthew,

I use the UC modifier as below to ensure that the city, state and month are capitalised.

{city:UC}, {state:UC} - {iptcmonthname:UC} {iptcday0:UC}: XXX on {iptcmonthname} {iptcday0}, {iptcyear4} in {city}, {state}.

This doesn't seem to be working on the latest version of PM6 or on PM6 Plus.

Is there a new modifier that needs to be used or is this a bug?

The new build is more strict than previous builds.  You must provide an index now.  It was always expected in the past but was not enforced.

{city:0:UC} should work where {city:UC} does not.  You can read the documentation here: https://docs.camerabits.com/support/solutions/articles/48001077381-variable-substring-extraction

-Kirk

Offline Matthew

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • matt-horwood.com
Re: variables - UC modifier
« Reply #3 on: December 29, 2020, 10:45:08 AM »
Oh brilliant - and string replacement implementation too. Missed that!
« Last Edit: December 29, 2020, 12:03:03 PM by Matthew »