Call a custom js function and use the result in email

Forums Dynamic Forms for SharePoint Call a custom js function and use the result in email

Viewing 3 reply threads
  • Author
    Posts
    • #26887
      Amal Vellappillil
      Participant

      Hi,

      Is it possible to call a custom js function and use its results from within an email template? I would like to use the return value just like using a variable {var:variablename} or field value {fin}.

      Please let me know if this is possible.

      Thank you,
      Amal Vellappillil

    • #26917
      Alexander Bautz
      Keymaster

      I don’t understand what you mean – can’t you just return your data to a variable and use it in the email template?

      If that won’t work you must give me some more information so I can fully understand what you mean.

      Alexander

    • #26919
      Amal Vellappillil
      Participant

      Hi Alexander,

      Thank you for your reply. I understand it’s possible to create a variable and use it an email template like {var:variableName}. I was just curious if there was a way to bypass that step of defining a variable and setting the variable.

      Ex:

      
      
      var fullName = "";
      function setFullName(firstName, lastName) {
          fullName = firstName + " " + lastName;
      }
      
      function getFullName(firstName, lastName) {
          return firstName + " " + lastName;
      }

      Instead of calling the setFullName function first then using the variable name fullName in the email template, I was wondering if there was a way to just use getFullName itself in email template.

      Hope I made things clear.

    • #26929
      Alexander Bautz
      Keymaster

      Thanks for the clarification. Unfortunately you cannot call a function directly in the email template.

      Alexander

Viewing 3 reply threads
  • You must be logged in to reply to this topic.