Author Topic: Hot Code Replacement: modifiers possible?  (Read 4543 times)

Offline Sven

  • Uber Member
  • ******
  • Posts: 1053
    • View Profile
Hot Code Replacement: modifiers possible?
« on: November 20, 2023, 10:01:54 AM »
Hi all,
is it possible to use modifiers in Hot Codes like we are able in Code Replacements?
Especially changing Text to upper- or lower case.
Sven
After 5 years of absence I restarted the photography.

Offline Max Lemesh

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Hot Code Replacement: modifiers possible?
« Reply #1 on: November 20, 2023, 02:57:27 PM »
What would the use case scenario be? Just wondering

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 935
    • View Profile
Re: Hot Code Replacement: modifiers possible?
« Reply #2 on: November 20, 2023, 03:16:53 PM »
Hi all,
is it possible to use modifiers in Hot Codes like we are able in Code Replacements?
Especially changing Text to upper- or lower case.
Sven
Those actually only work on variables, and not code replacements, so they won't work in Hot Codes. This could probably  be added for both code replacements and hot codes though.

That said, you could probably use spreadsheet software and use a formula in a new column in the Hot Code file to get the results you are looking for?

Offline Sven

  • Uber Member
  • ******
  • Posts: 1053
    • View Profile
Re: Hot Code Replacement: modifiers possible?
« Reply #3 on: November 20, 2023, 09:34:51 PM »
Thanks.
Avoiding that spreadsheet thing with formulas, etc. was the reason to ask.
Having multiple columns with the same content in different capitalization introduces redundancy and manual effort.
Also sometimes the startlists have a different format in regards to the capitalization.
Using the "PC-function" would ease up things.
Also sometimes there are special characters in the names that we need to avoid in the metadata (German chars like äüöß, etc) This could be done by the "TR"-feature like [[Firstname]:tr:ä/ae:tr:ö/oe:tr:ü/ue/tr:ß/ss]

@Max: Having clients that needs the persons in the format LASTNAME, Firstname, others as Firstname Lastname or Firstname LASTNAME.
With the option of modification you only need one column for firstname and one for the lastname and let PM do it's magic.
Caption: [Firstname], [Lastname] bla bla bla
Other field: [[Lastname]:UC], [Firstname]

See the example section here: https://docs.camerabits.com/support/solutions/articles/48001077381-variable-substring-extraction
After 5 years of absence I restarted the photography.

Offline Max Lemesh

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Hot Code Replacement: modifiers possible?
« Reply #4 on: November 21, 2023, 08:16:58 AM »
Those actually only work on variables

Follow up question then

can specify a combined string from variables as a hot code?
I use this in Code Replacements

Code: [Select]
={foldernum}{hour24}{minute:0,1}=
can I use the same sequence in hot codes format to get folder number and first 3 numbers of time?
Code: [Select]
//== {foldernum}{hour24}{minute:0,1}
//## Name Last Other
100101 name notname stuff


Offline Mick O (Camera Bits)

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 547
    • View Profile
    • Camera Bits
Re: Hot Code Replacement: modifiers possible?
« Reply #5 on: November 21, 2023, 09:20:12 AM »
Follow up question then
can specify a combined string from variables as a hot code?

I don't think that would work, but what about putting {foldernum}{hour24}{minute:0,1} into some unused field like Supplemental Cat 1 and then run your hot codes off of that?

Mick


Mick O
Camera Bits

Offline Sven

  • Uber Member
  • ******
  • Posts: 1053
    • View Profile
Re: Hot Code Replacement: modifiers possible?
« Reply #6 on: November 21, 2023, 09:25:03 AM »
That's what I do :)
I moved the Edit Status to the top of the IPTC window and put the BIB there for HC to evaluate.
After 5 years of absence I restarted the photography.

Offline Max Lemesh

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Hot Code Replacement: modifiers possible?
« Reply #7 on: November 21, 2023, 11:44:29 AM »

I don't think that would work, but what about putting {foldernum}{hour24}{minute:0,1} into some unused field like Supplemental Cat 1 and then run your hot codes off of that?

Mick

Thanks Mick! I'll try it this way

Offline Max Lemesh

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: Hot Code Replacement: modifiers possible?
« Reply #8 on: November 21, 2023, 11:52:49 AM »
Also, technical question.. is there a specific order in which variables are being read and CR and HC are applied?
Because in my case 
Code: [Select]
{foldernum}{hour24}{minute:0,1} is used to create a folder structure as well as add metadata

So, chicken and egg question...
what is created first? metadata in file being copied or folder structure where that file is being copied to?

if I would use that SuppCat1 to create a hot code, at what point PM would (would it?) use that hot code to created folders?