6 Replies Latest reply on May 3, 2017 9:04 AM by JErste

    Pull dynamic data for *other users* in email templates?

    jrundle@washingtonenergy.com Rookie

      Hi there. We have an appointment confirmation email template that auto-populates the customer's appointment date, time, and the name of the sales rep on that appointment, based on the currently selected Cal event. I want to pull Cal event userid's phone number too. I know you use <<&user_var.Phone>> when you want it to pull the information of the user who is actively sending the email. But because our call center sends the email on behalf of the sales rep, the email needs to pull the phone number of the Cal event userid.

       

      Here is the email:

       

      Our sales representative <<strtran(substr(user2full(cal->userid), at(" ",user2full(cal->userid))+2,255),")"," ")>> is scheduled to meet with you on: <<cal->ondate>> at <<iif(left(Cal->OnTime, 2)>"12", alltrim(str(val(left(Cal->OnTime, 2))-12))+right(alltrim(Cal->OnTime), 3)+"pm", IIF(padl(alltrim(str(val(left(Cal->OnTime, 2))-0)), 2, [0])=[12], padl(alltrim(str(val(left(Cal->OnTime, 2))-0)), 2, [0])+right(alltrim(Cal->OnTime), 3)+"pm", padl(alltrim(str(val(left(Cal->OnTime, 2))-0)), 2, [0])+right(alltrim(Cal->OnTime), 3)+"am"))>>.

      .....

       

      If you have any questions, feel free to contact <<strtran(substr(user2full(cal->userid), at(" ",user2full(cal->userid))+2,255),")"," ")>> at <<__________________>>

       

      I have tried <<&User_Var.Phone.(cal->userid)>> and <<&(cal->userid).Phone>> but neither worked. If anyone can help with that it would save us many many hours of creating static templates.

       

      Thank you!

        • 1. Re: Pull dynamic data for *other users* in email templates?
          DHunt Specialist

          Here is a section out of GoldMine Premium - The Definitive Guide

           

           

           

           

           

           

           

          The remaining four fields add information about the user that may also be used in document templates, e-mail templates as well as reports.  This information is stored in the UserID.ini under the section heading of [User_Var].  We'll discuss more on this shortly, and there are GoldMine macros specifically created to utilize this data ( see Appendix B ).  It is here, through this GUI, that the user should add their Title:, Department:, and Fax:.  Once this has been accomplished, these user variables would, hence forth, be available for the document templates, and e-mail templates, as well as reports.  The UserID.ini, at least the section populated by this dialog form tab, might look like the section shown here:

           

           

           

          [User_Var]

           

          Title = Owner

           

          Dept = Support

           

          Phone = (978)342-3333

           

          Now you won't be able to select other UserID's information from your E-mail Templates unless you are logged in as them, but they will able to inset their variables using the same templates.

          • 2. Re: Pull dynamic data for *other users* in email templates?
            jrundle@washingtonenergy.com Rookie

            Thanks for your reply. I know you can easily pull the logged-in user's information using these variables. What I need is a way to pull the information from someone else's userID; the <<cal->userID>> specifically. I am able to extract the other user's full name using user2full(cal->userID) so I am hoping to find a way to pull the phone # for that userID. My thinking is, that if I am able to pull the full name using the UserID, I should also be able to pull other details?

            • 3. Re: Pull dynamic data for *other users* in email templates?
              jrundle@washingtonenergy.com Rookie

              Update: I found this in Goldmine admin guide:

               

              The &User_Var macro allows GoldMine users to store specific data that can be retrieved later into applications that are linked via DDE with GoldMine. This macro can be defined in the [user_var] section of both the GM.INI and the username.INI of GoldMine.

               

              Usage Syntax: &User_Var.<variable name>.<Goldmine username>

               

              Example: &User_Var.Territory.Dan

               

              where <variable name> is a descriptive name of the macro and <Goldmine username> assigns a defined value to a specific GoldMine user. <Goldmine username> is optional. as Goldmine will assign these values to the current Goldmine user.

               

              I tried &User_Var.Phone.[a static username], and it worked and correctly populated that phone number. But I can't get cal->userid to work in its place. I tried:

               

              <<&User_Var.Phone.Cal->UserID>>

              <<&User_Var.Phone.(Cal->UserID)>>

              <<&User_Var.Phone.'Cal->UserID'>>

              • 4. Re: Pull dynamic data for *other users* in email templates?
                Doug Castell Expert

                How about

                <<&User_Var.Phone.<<Cal->UserID

                • 5. Re: Pull dynamic data for *other users* in email templates?
                  jrundle@washingtonenergy.com Rookie

                  Did not work but thanks for your guess!

                  • 6. Re: Pull dynamic data for *other users* in email templates?
                    JErste Specialist

                    Try: <<&User_Var.Phone.&Cal.UserID>>

                    1 of 1 people found this helpful