How can i fetch key value data using aws textract activity?

I am trying to use AWS Textract activity and I was able to fetch table data from the Document.

Only trouble I am having is I am unable to fetch key value data from document using
pageDetail.FormData

1

How can I fetch key value pairs from document?

Any help is appreciated

Hi,

According to the official document, perhaps it will be as the following. (Sorry but i haven’t actually run it)
Can you try this?

Regards,

1 Like

Hi @Yoichi,

Thank you its working.

Can you please tell me how can i grab specific name and its value from currentItem?

for example: I want to fetch

Name: Roll No
Value: 1001

Hi,

Can you try either of the following?

ForEach and If

LINQ

resultFormField = varPageDetails.FormFields.Items.Where(Function(f) f.Name="Roll No").SingleOrDefault

note: resultFormField is FormField type.

Regards,

Thank you so much, First one worked.

one last thing if i want to fetch lets say 5 specific fields out of 10. Then I will be using multiple “5” if conditions and “5” assign activities right?

HI,

Yes, it’s one of solutions. However, it might be better to use Dictionary and Array as the following.

dict = varPageDetails.FormFields.Items.ToDictionary(Function(f) f.Name,Function(f) f)

dict is Dictionary<string,FormField> type

Hope this helps you.

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.