Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Formatting of message in email action

    Scheduled Pinned Locked Moved Support
    buildmasteremailactions
    8 Posts 1 Posters 13 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      How do you put a carriage return / line feed character into a variable?

      I would like to send out an email listing the components that have been deployed (not all components are in each release), eg:

      This release consists of:

      • Client 1.1.1.1
      • Server 1.1.1.2
      • etc

      I populate a variable for each item that I deploy, eg:

      CLIENT_MSG = * Server configuration build

      And set the message body as follows:
      This release consists of:

      %CLIENT_MSG% %SERVER_MSG% %CONFIG_MSG% %DATABASE_MSG%

      Unfortunately the <br> is not valid. I could just put each variable on a separate line but I would end up with a empty lines for those components not included... Not a big deal but if there is an easy way to get around this.

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        In addition, any ideas how to converting a link with spaces to a proper hyperlinked text in a email:

        eg
        \dwdcw-cofp01\Release\PowerBuilder 12.5\CusMod\Version %CLIENT_VERSION%

        puts in a link up to the first space \dwdcw-cofp01\Release\PowerBuilder

        I've tried surrounding in quotes and using %20 and + to replace the space character but haven't had any success with those.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          How do I set up an empty variable?

          eg If I use set variable action on variable that doesn't exist as follows:

          MSG = %MSG%
          Client version = %CLIENT_VERSION%
          

          I will end up with a string like:

          %MSG%
          Client...
          

          Note the unwanted %MSG% at the beginning.

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            There's no way to set an empty value because it's going to inherit the default value (which also could not be empty) - you would need a custom variable for that unless you used some trickery, e.g. if the email is HTML email, set the value to <!-- empty --> or something like that.

            That being said, it might be easier to write a custom notifier if this email is to be sent after the execution completes. We can send you example code for some of the current notifiers if you're interested in that.

            As for the URL issue, try putting file:// in front of the URL and use %20 for spaces (which would be %%20 when escaped for the variable engine, e.g.:

            file://\\dwdcw-cofp01\Release\PowerBuilder%%2012.5\CusMod\Version%%20%CLIENT_VERSION%
            
            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              Is there any way to insert a carriage return into a variable?

              1 Reply Last reply Reply Quote 0
              • ? This user is from outside of this forum
                Guest
                last edited by

                Variables themselves can contain any string value, but the "Set Variable Value" action editor is only a single-line text box.

                You could create a new Set Variable Value action ("Set Multiline Variable Value" or something) that has a multi-line text editor, and behaves exactly the same way.

                1 Reply Last reply Reply Quote 0
                • ? This user is from outside of this forum
                  Guest
                  last edited by

                  I've created a few extensions now so quite comfortable with that, but rather than create from scratch is there anyway to inherit off the current variable setter and override to change the editor to multi-line?

                  1 Reply Last reply Reply Quote 0
                  • ? This user is from outside of this forum
                    Guest
                    last edited by

                    The editors/extensions are sealed, so unfortunately the only pattern available at this time is the "Inherits by Clipboard" pattern.

                    In this case it shouldn't be so bad, since it's a couple-line action+editor.

                    1 Reply Last reply Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • 1 / 1
                    • First post
                      Last post
                    Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation