Closed brbeaird closed 5 years ago
Hey, thanks! Great info, I will give this a shot.
Oops - just noticed even my comment above got escaped unintentionally! I've fixed it. The key is to send two backslashes followed by an asterisk. When DocuSign sees that, it knows to use that merge value to fill in ALL instances of tabs that have that data label.
Yup, worked perfectly!!!! You just made my day. Huge thanks.
By the way, I had no issue prefixing the tabLabel property with "*" in the C# api. Worked like a charm.
and yea, it is also removing a slash in my post above..... "backslash-backslash-asterisk" should be the prefix
Oh interesting - so you just did something like:
TextTabs.TabLabel = "\\*MyLabel"
And that worked without you changing anything? Weird. Without my customized hack to the library code, that did not seem to work for me last week because it was sending four slashes.
Yes, I am concatenating it just like your example and it is working for me.
Thanks! @brbeaird it's work for me. Regards.
Finally circling back on this now that we're using the nuGet package instead of compiling our own version. I confirmed that I can use multiple fields with the same label if I prefix the label with a single blackslash and asterisk (not two backslashes like mentioned above). Two backslashes will result in four total when Newstonsoft escapes them while serializing the object.
I'll also remove my old pull request.
A little-known feature of DocuSign is you can actually use a single tab label to prefill multiple fields on the same document. For example, you may need to put a signer's phone number in multiple fields. You can do this by setting those fields to the same data label in the template. Then, when you set a value for that tab in the API, you need to prefix the tab label with "\*". However, this doesn't work with the current c# library because the functions end up trying to escape that string with an extra set of "\."
I submitted a pull request as a potential fix to this, although it feels like a hack to me to just un-escape the * tabs, so if someone else can figure out a cleaner way or else suggest another alternative for me, go for it.
Credit to: http://stackoverflow.com/questions/26320678/docusign-how-to-prefill-multiple-text-tabs-with-the-same-label-in-xml