Author Topic: Enhancement to Advanced Code Replacement  (Read 2504 times)

Offline mfryd

  • Newcomer
  • *
  • Posts: 28
    • View Profile
Enhancement to Advanced Code Replacement
« on: December 18, 2012, 01:51:51 PM »
Advanced Code Replacement currently allows multiple values for each replacement.  You can specify which replacement you want by adding #number to the request.

For example \code#2\ will be replaced with the second replacement value for "code"

It would be extremely helpful if we could reference values by name, in addition to column number.  For instance \code#hometown\ would be replaced with the value from the home town column.

My suggested implementation would be to use the first row of the file as the column names.  Users could use either the traditional column number or the column name.

For instance if the code replacement file contained:

code              hometown          age         weight          height
34                Miami             21          100             5'9"
54                Boca Raton        20          98              5'7"
37                Delray Beach      19          130             5'2"


Then "\34#age\" or "\34#2\"would be replaced by "21"
For compatibility,  specifying the code from the first line would get you the name of the column.   "\code#2\" would be replaced by "age".

PM me if you need real world examples of how we would use this feature.

Online Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 20962
    • View Profile
    • Camera Bits, Inc.
Re: Enhancement to Advanced Code Replacement
« Reply #1 on: December 18, 2012, 03:37:29 PM »
Advanced Code Replacement currently allows multiple values for each replacement.  You can specify which replacement you want by adding #number to the request.

For example \code#2\ will be replaced with the second replacement value for "code"

It would be extremely helpful if we could reference values by name, in addition to column number.  For instance \code#hometown\ would be replaced with the value from the home town column.

My suggested implementation would be to use the first row of the file as the column names.  Users could use either the traditional column number or the column name.

For instance if the code replacement file contained:

code              hometown          age         weight          height
34                Miami             21          100             5'9"
54                Boca Raton        20          98              5'7"
37                Delray Beach      19          130             5'2"


Then "\34#age\" or "\34#2\"would be replaced by "21"
For compatibility,  specifying the code from the first line would get you the name of the column.   "\code#2\" would be replaced by "age".

PM me if you need real world examples of how we would use this feature.

No need.  I understand what you're getting at.

Neat idea.

-Kirk

Offline ImageGroupLA

  • Newcomer
  • *
  • Posts: 34
    • View Profile
Re: Enhancement to Advanced Code Replacement
« Reply #2 on: December 22, 2012, 08:13:32 PM »
This would be a big improvement for photographers not in the sports field that use uniform numbers to retrieve names, etc.

Offline devenh

  • Sr. Member
  • ****
  • Posts: 435
    • View Profile
Re: Enhancement to Advanced Code Replacement
« Reply #3 on: January 08, 2013, 10:05:29 AM »
Excellent idea!