Retrieve Field Summary at Document Level

0 votes
Hello, Using below retrieves a list of field values at the package level. But is it possible to retrieve the field values for a particular document? eslClient.getFieldValues(packageId) Thanks

Reply to: Retrieve Field Summary at Document Level

0 votes
Hi there, Simply use this code snippet to loop through all the fields:
		EslClient eslClient = new EslClient(API_KEY, API_URL);
		PackageId packageId = new PackageId("package_id");
		String documentName = "document_name";

		Document document2 = eslClient.getPackage(packageId).getDocument(documentName);
		for (Signature signature : document2.getSignatures()) {
			for (Field field : signature.getFields()) {
				System.out.println(field.getStyle() + " : " + field.getId() + " : " + field.getName() + " : " + field.getValue());
This will print out all the fields with or without value while for the eslClient.getFieldValues(packageId) function, it only returns fields with values and returns fields in all documents. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off