Skip to main content
Question

Update Tab in an envelope c#

  • November 13, 2025
  • 2 replies
  • 23 views

Forum|alt.badge.img+1

I have a number tab called Employee Number.  How do I update this tab using esign API in C# before I send the email?

This is my existing MakeEnvelope where I am attempting to do it:

 

        public static EnvelopeDefinition MakeEnvelope(
            string signerEmail,
            string signerName,
            string ccEmail,
            string ccName,
            string templateId)
        {
            // Data for this method
            // signerEmail
            // signerName
            // ccEmail
            // ccName
            // templateId
            EnvelopeDefinition env = new EnvelopeDefinition();
            env.TemplateId = templateId;

            

            //env.AllowMarkup = "false";
            //env.EnforceSignerVisibility = "true";
            //env.RecipientViewRequest

            Number employeeNumber = new Number
            {
                TabLabel = "Employee Number",
                Value = "1234567890"
            };

            Tabs tabs = new Tabs
            {
                NumberTabs = new List<Number> { employeeNumber }
            };

            


            TemplateRole signer1 = new TemplateRole();
            signer1.Email = signerEmail;
            signer1.Name = signerName;
            signer1.RoleName = "Employee";
            signer1.Tabs = tabs;

            //TemplateRole cc1 = new TemplateRole();
            //cc1.Email = ccEmail;
            //cc1.Name = ccName;
            //cc1.RoleName = "cc";


           

            //env.TemplateRoles = new List<TemplateRole> { signer1, cc1 };
            env.TemplateRoles = new List<TemplateRole> { signer1 };
            env.Status = "sent";
            return env;
            //ds-snippet-end:eSign9Step2
        }

2 replies

Inbar.Gazit
Docusign Employee
Forum|alt.badge.img+4
  • Docusign Employee
  • November 13, 2025

First, I suggest you consider using Numerical tab and not Number tab (sounds similar, but Numerical is newer and better)
Try to set the .Value property of the tab.

See https://developers.docusign.com/docs/esign-rest-api/how-to/set-envelope-tab-values/ as well as C# code in https://github.com/docusign/code-examples-csharp/blob/master/launcher-csharp/eSignature/Examples/SetEnvelopeTabValue.cs

 

            Numerical numericalSalary = new Numerical
{
ValidationType = "Currency",
XPosition = "210",
YPosition = "235",
Height = "20",
Width = "70",
PageNumber = "1",
DocumentId = "1",
MinNumericalValue = "0",
MaxNumericalValue = "1000000",
TabId = "salary",
TabLabel = "Salary",
NumericalValue = salary.ToString(),
LocalePolicy = new LocalePolicyTab
{
CultureName = "en-US",
CurrencyCode = "usd",
CurrencyPositiveFormat = "csym_1_comma_234_comma_567_period_89",
CurrencyNegativeFormat = "minus_csym_1_comma_234_comma_567_period_89",
UseLongCurrencyFormat = "true",
},
};

TextCustomField salaryCustomField = new TextCustomField
{
Name = "salary",
Required = "false",
Show = "true", // Yes, include in the CoC
Value = salary.ToString(),
};

 


Forum|alt.badge.img+1
  • Author
  • New Voice
  • November 17, 2025

Will the code above work when numericSalary already exists in the template and we are just updating the value?

I don’t want to add, I just want to add a value to an existing tab.

Thank you!