title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Not display empty brackets ()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Seasider

    • May 2024
    • 11

    Not display empty brackets ()

    Hi again,

    I recently had a very helpful reply telling me how to add a date after a title display. This places the date in brackets, but when there is no date, it shows empty brackets - ().

    Is there a code to add, please, that will not show the brackets if there is no information to display inside them?

    Thank you.

  • Spoon
    Administrator
    • Apr 2002
    • 44477

    #2
    Is not possible because the ( ) you have added are not part of the date.
    Spoon
    www.dbpoweramp.com

    Comment

    • Seasider

      • May 2024
      • 11

      #3
      Thanks for your swift reply. So, just to clarify, the code I used - preformat:=title:=[title] ([year]) - cannot have any amendment made other than to physically remove the brackets?

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44477

        #4
        try:

        preformat:=title:=[title] [IFVALUE]year,([year]),[]
        Spoon
        www.dbpoweramp.com

        Comment

        • Seasider

          • May 2024
          • 11

          #5
          Thank you for your advice.

          Comment

          • Seasider

            • May 2024
            • 11

            #6
            Sorry to be a pain!....but I am now trying to do the same with a custom tag of 'comment' to add info after the artist name using
            'preformat:=artist:=[artist] ([tag]comment[])' . This works, but I can't figure out how to incorporate the [IFVALUE] part to ignore empty brackets.
            Thanks in advance.

            Comment

            • Spoon
              Administrator
              • Apr 2002
              • 44477

              #7
              [IFVALUE]comment,([tag]comment[]),[]
              Spoon
              www.dbpoweramp.com

              Comment

              • mville
                dBpoweramp Guru

                • Dec 2008
                • 4021

                #8
                The programmable action is [IFVALUE]tag,strifvalue,strnovalue[].

                I
                f tag has a value, then strifvalue is used, otherwise strnovalue is used, e.g. [IFVALUE]artist,Artist has a value,Artist has no value[]

                So, use ([tag]comment[]), only if comment is populated i.e.[IFVALUE][tag]comment[],([tag]comment[]),[]
                ​​

                Comment

                • Seasider

                  • May 2024
                  • 11

                  #9
                  Thanks again for your help, it is appreciated.

                  Comment

                  Working...

                  ]]>