Retrieving Field Values
Wednesday, November 4, 2020 at 08:16amWe have forms that we need to retrieve the values from but not all fields are required. WHen I use the FieldSummaryService.GetFieldSummary the blank fields are dropped instead of returning "" so no fields are missed. How do I obtain values for all fields even the blank ones. I'm using c# .NET
Reply to: Retrieving Field Values
Tuesday, October 4, 2022 at 02:17pmHi Richard,
Due to the nature of the Field Summary API, it only returns fields where signer has input values. To obtain values for all fields even the blank ones, you may have to retrieve the complete package object and loop through the fields list like below:
DocumentPackage pkg = eslClient.GetPackage(new PackageId("HkHNdgqUkd313II7pB8chyCpep0="));
foreach (var document in pkg.Documents) {
foreach (var signature in document.Signatures) {
foreach (var field in signature.Fields) {
Debug.WriteLine($"field id: {field.Id}; field signer: {signature.SignerEmail}; field value: {field.Value}");
}
}
}
Duo
Reply to: Retrieving Field Values
Tuesday, October 4, 2022 at 02:17pmI just started using this now that the user has finished their project. Should I expect the fields from the FastTrack to always be in the same order when I extract them? Are the fields saved in the order they are displayed, tabbed though, filled in or some other order? Thank you
Reply to: Retrieving Field Values
Tuesday, October 4, 2022 at 02:17pmHi Richard,
Sorry for the late reply! Which method are you using to extract the field values? FieldSummaryService.GetFieldSummary or the way I suggested above? Either way, I found the fields are returned in alphabetical order according to the field ID. However, it's always better to uniquely reference a field by mapping its field ID or Name, instead of replying on the order.
Duo