Grooper 21.00.0077 is available as of 8-30-2023! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 23.00.0030 is available as of 9-11-2023! Check the Downloads Discussion for the release notes and to get the latest version.

get the values from different directions for same data field

Hi Everyone,
we have a form type with different templates and we are extracting the data from documents using a key-value pair.
The issue is sometimes the value comes after the key and in some cases at the top of the key.
We tried both vertical and horizontal direction logic. but it's not giving good results.
1.Name: John
Here Name is a Key
John is value
Please help.

Mounika Potla.


  • tgarnetttgarnett Posts: 76 ✭✭✭
    Hi Mounika,

    You should be able to accommodate both formats. Here I've enabled Horizontal and Vertical layouts, and set the Vertical Direction to "Reverse" since the Key will be below the Value.

  • mounikapotlamounikapotla Posts: 31
    Hi @tgarnett,
    I have tried as you suggested but still getting same issue.
    At horizontal direction, the value was there in the right side of the key but while extracting the data it is fetching the above key.

    Mounika Potla.
  • tgarnetttgarnett Posts: 76 ✭✭✭
    Is it possible to make your Value extractor more specific? If the value can't be more specific, you might be able to filter out bad results in the "Result Filter" property of your Value data format, like specifying a maximum font size.

    You could also try separating the vertical and horizontal into separate extractors. Here the Horizontal Key would look for "Name:" while Vertical looks for "Name" without the colon. So if a colon exists after the key, the extractor will not look above for the value.

  • GrooperGuruGrooperGuru Posts: 480 admin
    So there is logic built into Key Value Pairs that determines which value gets associated to a key. If you have a single Key Value Pair that uses both horizontal and vertical options, it will attempt both and ultimately choose to keep the value that is geometrically closet to the key. In your screenshot above, that means that "project summary detail" is actually closer than "1-4H". If your key value pair also enables flow layout, it will prefer the result of the flow layout before falling back to the geometric layouts. If you cannot make the value more specific as a way to prevent false positives, then you may need to create multiple kay value pairs, but have each key value pair only execute one layout style. Then you can reference both key value pairs and use the "Extractor Order"  sorting method to determine which layout style should win.
    Matt Harrison
    Product Manager
    [email protected]
Sign In or Register to comment.