diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_custom_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_custom_documents_async.py index ebebd0aceec4..5a21313ff053 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_custom_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_custom_documents_async.py @@ -69,6 +69,9 @@ async def analyze_custom_documents_async(custom_model_id): print("Document has type {}".format(document.doc_type)) print("Document has document type confidence {}".format(document.confidence)) print("Document was analyzed with model with ID {}".format(result.model_id)) + for name, field in document.fields.items(): + field_value = field.value if field.value else field.content + print("......found field of type '{}' with value '{}' and with confidence {}".format(field.value_type, field_value, field.confidence)) # iterate over tables, lines, and selection marks on each page for page in result.pages: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_custom_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_custom_documents.py index 6ee58663c097..3a6dd7c403ca 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_custom_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_custom_documents.py @@ -63,6 +63,10 @@ def analyze_custom_documents(custom_model_id): print("Document has type {}".format(document.doc_type)) print("Document has document type confidence {}".format(document.confidence)) print("Document was analyzed with model with ID {}".format(result.model_id)) + for name, field in document.fields.items(): + field_value = field.value if field.value else field.content + print("......found field of type '{}' with value '{}' and with confidence {}".format(field.value_type, field_value, field.confidence)) + # iterate over tables, lines, and selection marks on each page for page in result.pages: