3 Replies Latest reply on May 26, 2009 2:49 AM by Gene McCullagh

    Conditional metadata fields

    Gene McCullagh Most Valuable Participant (Moderator)

      Here's my problem... I'm trying to include additional metadata fields based on a boolean flag.

       

      I have two definition files, let's call them fieldsLite.lua and fieldsPro.lua

       

      If I include either one in the Info.lua file then their corresponding set of fields are available. But if I try this:

       

       

      if proFlag == true then

       

      return {

       

      - - some code

       

       

      - - Add metadata definition file

      LrMetadataProvider = 'fieldsPro.lua',

       

       

      - - some more code

       

      }

       

      else

       

      return {

       

      - - some code

       

       

      - - Add metadata definition file

      LrMetadataProvider = 'fieldsLite.lua',

       

       

      - - some more code

       

      }

       

      end

       

      The plugin does not return any errors but none of the fields in either definition file appear.

       

      Any ideas?  Thanks!