cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
liversuch
Frequent Visitor

Recognize text in an image and then populate a Microsoft List - by LINE & COLUMN

Hi,

 

I'm new to Power Automate so apologies in advance.

 

My ultimate aim is for Power Automate to convert handwriting to text, populate the text to a List and then populate specific areas of a Word document.

 

I have successfully completed this using 'Recognize Text in an Image' connector. The  extracted text then populates a column in a Sharepoint List and then via a separate automated flow the new entry within the Lists prompts a Word template to be populated.

 

The problem I have is that for each handwritten LINE I want it to populate a specific column in the Sharepoint List. At the moment I can only get ALL the handwriting to be populated, not specific lines - even though the Apply to Each does recognise there are different lines. So place LINE 1 in a specific column, LINE 2 in a specific column, etc. 

 

Thanks!

16 REPLIES 16

Can you show the output of the OCR connector?

liversuch
Frequent Visitor

Hi @Chriddle ,

 

Much appreciated.

The 'recognize text from an image' is working but then adding 6 separate entries to the Microsoft List - see screenshot.

As I note, ideally I want like Line 1 to be placed in a specifc column within the List, Line 2 to a different column, etc.

But what does the output JSON code from the 'recognize text from an image' look like?

liversuch
Frequent Visitor

Hi @Chriddle,

 

Sorry please see attached - help gratefully received.

That's not what I asked for.

Pls. run the flow and show the output of the 'recognize text from an image' connector.

liversuch
Frequent Visitor

{
"statusCode": 200,
"headers": {
"Cache-Control": "no-cache",
"Vary": "Accept-Encoding",
"x-ms-service-request-id": "f2f9c5af-cfd1-45a6-9106-c1884a1a459a,dac418b4-e50c-4e70-839a-ab6c23599363",
"Set-Cookie": "ARRAffinity=6dc82f9b31441f7c5335cc8d7694f93f11a62ad4514051b55843d85d1a6e2d2c15134d20c556b0b34b9b6ae43ec3f5dcdad61788de889ffc592af7aca85fc1c508DC62A44B58A65F641915742; path=/; secure; HttpOnly,ReqClientId=23691781-11a4-4760-97cb-703f4aecc1fc; expires=Sun, 22-Apr-2074 07:44:55 GMT; path=/; secure; HttpOnly,ARRAffinity=6dc82f9b31441f7c5335cc8d7694f93f11a62ad4514051b55843d85d1a6e2d2c15134d20c556b0b34b9b6ae43ec3f5dcdad61788de889ffc592af7aca85fc1c508DC62A44B58A65F641915742; path=/; secure; HttpOnly",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"REQ_ID": "dac418b4-e50c-4e70-839a-ab6c23599363",
"CRM.ServiceId": "CRMAppPool",
"AuthActivityId": "77dacf57-494f-467a-bc8c-0d715215323f",
"x-ms-dop-hint": "4",
"x-ms-ratelimit-time-remaining-xrm-requests": "1,200.00",
"x-ms-ratelimit-burst-remaining-xrm-requests": "7999",
"OData-Version": "4.0",
"X-Source": "73172180247222252161146323910814332942021442065424012169185110221989023778882025320,622533841021895914295160252208309417899108114210322222723417588335020874254108141",
"Public": "OPTIONS,GET,HEAD,POST",
"Date": "Mon, 22 Apr 2024 07:44:59 GMT",
"Allow": "OPTIONS,GET,HEAD,POST",
"Content-Type": "application/json; odata.metadata=minimal",
"Content-Length": "5380",
"Expires": "-1"
},
"body": {
"responsev2": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"operationStatus": "Success",
"predictionId": "9be82aca-17e1-4d01-8b1d-150aaf6a1208",
"predictionOutput": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"results@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"results": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"page": 1,
"lines@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"lines": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "Line 1",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.0651024334757197,
"top": 0.13364039518517884,
"width": 0.04817338060721936,
"height": 0.012901734499940087,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06640932247486053,
"y": 0.13456500522233447
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11327581408293906,
"y": 0.13364039518517884
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11327581408293906,
"y": 0.14654212968511893
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.0651024334757197,
"y": 0.14654212968511893
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "This works",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.562494705889471,
"top": 0.12718524733318495,
"width": 0.16667675068672183,
"height": 0.03594849579644879,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.562494705889471,
"y": 0.12810985737034056
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.727864567577052,
"y": 0.12718524733318495
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7291714565761929,
"y": 0.16129308425937022
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.562494705889471,
"y": 0.16313374312963375
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "Line 2",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.06380764530064498,
"top": 0.18802116329640603,
"width": 0.050775057781434915,
"height": 0.011977124462784428,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06380764530064498,
"y": 0.18802116329640603
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11458270308207989,
"y": 0.18802116329640603
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11458270308207989,
"y": 0.19999828775919046
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06380764530064498,
"y": 0.19999828775919046
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "It really works",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.5703118382361839,
"top": 0.18156601544441212,
"width": 0.2174518084681567,
"height": 0.03502388575929319,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.5703118382361839,
"y": 0.18156601544441212
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7877636467043406,
"y": 0.18156601544441212
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7877636467043406,
"y": 0.21566529116654964
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.5703118382361839,
"y": 0.2165899012037053
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "Line 3",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.06250075630150413,
"top": 0.2396281012961663,
"width": 0.05077505778143493,
"height": 0.013826344537095692,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06250075630150413,
"y": 0.24055271133332193
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11327581408293906,
"y": 0.2396281012961663
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11327581408293906,
"y": 0.2525298357961064
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06250075630150413,
"y": 0.253454445833262
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "So it does",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.5598930287152556,
"top": 0.2322569046110645,
"width": 0.17057321603601205,
"height": 0.03594849579644885,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.5611999177143964,
"y": 0.2322569046110645
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7304662447512676,
"y": 0.234097563481328
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7291714565761929,
"y": 0.26820540040751334
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.5598930287152556,
"y": 0.2672807903703577
}
]
}
}
}

That's not a valid JSON 😉

liversuch
Frequent Visitor

Thanks for trying to help - I'm obviously unsure what you are asking for. After running a manual test, I've extracted the 'Code View' from the 'recognize text from an image" connector. Clearly incorrect so where do I get the JSON code from?

I am talking about this:

Chriddle_1-1713775638280.png

 

 

{
"@odata.context": "https://org50988feb.crm4.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.PredictResponse...
"responsev2": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"operationStatus": "Success",
"predictionId": "aa717479-2cf4-4364-9b2f-d8d3b09cabbc",
"predictionOutput": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"results@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"results": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"page": 1,
"lines@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"lines": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "Line 1",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.0651024334757197,
"top": 0.13364039518517884,
"width": 0.04817338060721936,
"height": 0.012901734499940087,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06640932247486053,
"y": 0.13456500522233447
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11327581408293906,
"y": 0.13364039518517884
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11327581408293906,
"y": 0.14654212968511893
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.0651024334757197,
"y": 0.14654212968511893
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "This works",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.562494705889471,
"top": 0.12718524733318495,
"width": 0.16667675068672183,
"height": 0.03594849579644879,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.562494705889471,
"y": 0.12810985737034056
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.727864567577052,
"y": 0.12718524733318495
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7291714565761929,
"y": 0.16129308425937022
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.562494705889471,
"y": 0.16313374312963375
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "Line 2",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.06380764530064498,
"top": 0.18802116329640603,
"width": 0.050775057781434915,
"height": 0.011977124462784428,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06380764530064498,
"y": 0.18802116329640603
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11458270308207989,
"y": 0.18802116329640603
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11458270308207989,
"y": 0.19999828775919046
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06380764530064498,
"y": 0.19999828775919046
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "It really works",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.5703118382361839,
"top": 0.18156601544441212,
"width": 0.2174518084681567,
"height": 0.03502388575929319,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.5703118382361839,
"y": 0.18156601544441212
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7877636467043406,
"y": 0.18156601544441212
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7877636467043406,
"y": 0.21566529116654964
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.5703118382361839,
"y": 0.2165899012037053
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "Line 3",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.06250075630150413,
"top": 0.2396281012961663,
"width": 0.05077505778143493,
"height": 0.013826344537095692,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06250075630150413,
"y": 0.24055271133332193
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11327581408293906,
"y": 0.2396281012961663
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.11327581408293906,
"y": 0.2525298357961064
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.06250075630150413,
"y": 0.253454445833262
}
]
}
}
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"text": "So it does",
"boundingBox": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"left": 0.5598930287152556,
"top": 0.2322569046110645,
"width": 0.17057321603601205,
"height": 0.03594849579644885,
"polygon": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"coordinates": [
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.5611999177143964,
"y": 0.2322569046110645
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7304662447512676,
"y": 0.234097563481328
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.7291714565761929,
"y": 0.26820540040751334
},
{
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"x": 0.5598930287152556,
"y": 0.2672807903703577
}
]
}
}
}
]
}
]
}
}
}

You should familiarize yourself with tools like this https://jsonlint.com

This time it was just a minor issue and I fixed it 😉

 

Here is a sample flow showing how you can address this problem.

In particular, the way I created the result within Apply to Each can be simplified (e.g. if you always have 2 columns, like in your example).

 

 

This is the first Compose's Input. (Your JSON with the fixed double quote):

Spoiler
{
  "@odata.context": "https://org50988feb.crm4.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.PredictResponse...",
  "responsev2": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "operationStatus": "Success",
    "predictionId": "aa717479-2cf4-4364-9b2f-d8d3b09cabbc",
    "predictionOutput": {
      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
      "results@@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
      "results": [
        {
          "@odata.type": "#Microsoft.Dynamics.CRM.expando",
          "page": 1,
          "lines@@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
          "lines": [
            {
              "@odata.type": "#Microsoft.Dynamics.CRM.expando",
              "text": "Line 1",
              "boundingBox": {
                "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                "left": 0.0651024334757197,
                "top": 0.13364039518517884,
                "width": 0.04817338060721936,
                "height": 0.012901734499940087,
                "polygon": {
                  "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                  "coordinates@@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
                  "coordinates": [
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.06640932247486053,
                      "y": 0.13456500522233447
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.11327581408293906,
                      "y": 0.13364039518517884
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.11327581408293906,
                      "y": 0.14654212968511893
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.0651024334757197,
                      "y": 0.14654212968511893
                    }
                  ]
                }
              }
            },
            {
              "@odata.type": "#Microsoft.Dynamics.CRM.expando",
              "text": "This works",
              "boundingBox": {
                "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                "left": 0.562494705889471,
                "top": 0.12718524733318495,
                "width": 0.16667675068672183,
                "height": 0.03594849579644879,
                "polygon": {
                  "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                  "coordinates@@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
                  "coordinates": [
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.562494705889471,
                      "y": 0.12810985737034056
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.727864567577052,
                      "y": 0.12718524733318495
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.7291714565761929,
                      "y": 0.16129308425937022
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.562494705889471,
                      "y": 0.16313374312963375
                    }
                  ]
                }
              }
            },
            {
              "@odata.type": "#Microsoft.Dynamics.CRM.expando",
              "text": "Line 2",
              "boundingBox": {
                "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                "left": 0.06380764530064498,
                "top": 0.18802116329640603,
                "width": 0.050775057781434915,
                "height": 0.011977124462784428,
                "polygon": {
                  "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                  "coordinates@@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
                  "coordinates": [
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.06380764530064498,
                      "y": 0.18802116329640603
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.11458270308207989,
                      "y": 0.18802116329640603
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.11458270308207989,
                      "y": 0.19999828775919046
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.06380764530064498,
                      "y": 0.19999828775919046
                    }
                  ]
                }
              }
            },
            {
              "@odata.type": "#Microsoft.Dynamics.CRM.expando",
              "text": "It really works",
              "boundingBox": {
                "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                "left": 0.5703118382361839,
                "top": 0.18156601544441212,
                "width": 0.2174518084681567,
                "height": 0.03502388575929319,
                "polygon": {
                  "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                  "coordinates@@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
                  "coordinates": [
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.5703118382361839,
                      "y": 0.18156601544441212
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.7877636467043406,
                      "y": 0.18156601544441212
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.7877636467043406,
                      "y": 0.21566529116654964
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.5703118382361839,
                      "y": 0.2165899012037053
                    }
                  ]
                }
              }
            },
            {
              "@odata.type": "#Microsoft.Dynamics.CRM.expando",
              "text": "Line 3",
              "boundingBox": {
                "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                "left": 0.06250075630150413,
                "top": 0.2396281012961663,
                "width": 0.05077505778143493,
                "height": 0.013826344537095692,
                "polygon": {
                  "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                  "coordinates@@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
                  "coordinates": [
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.06250075630150413,
                      "y": 0.24055271133332193
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.11327581408293906,
                      "y": 0.2396281012961663
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.11327581408293906,
                      "y": 0.2525298357961064
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.06250075630150413,
                      "y": 0.253454445833262
                    }
                  ]
                }
              }
            },
            {
              "@odata.type": "#Microsoft.Dynamics.CRM.expando",
              "text": "So it does",
              "boundingBox": {
                "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                "left": 0.5598930287152556,
                "top": 0.2322569046110645,
                "width": 0.17057321603601205,
                "height": 0.03594849579644885,
                "polygon": {
                  "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                  "coordinates@@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
                  "coordinates": [
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.5611999177143964,
                      "y": 0.2322569046110645
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.7304662447512676,
                      "y": 0.234097563481328
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.7291714565761929,
                      "y": 0.26820540040751334
                    },
                    {
                      "@odata.type": "#Microsoft.Dynamics.CRM.expando",
                      "x": 0.5598930287152556,
                      "y": 0.2672807903703577
                    }
                  ]
                }
              }
            }
          ]
        }
      ]
    }
  }
}

 

Chriddle_4-1713859170715.png

Chriddle_5-1713859205438.png

 

The first Select reduced the item to the properties we need (text and top).

This is just to make the expressions simpler.

From:

 

first(outputs('Compose')['responsev2']['predictionOutput']['results'])['Lines']

 

Map Text:

 

item()['Text']

 

Map Top:

 

item()['boundingBox']['top']

 

 

Select 2 calculates if an item starts a new line by checking if its top value is greater than the previous item's top value (here the difference must be greater than 0.04)

From:

 

range(0, length(body('Select')))

 

Map Test:

 

body('Select')[item()]['Text']

 

Map IsRowStart:

 

or(
	equals
	(
		item(),
		0
	),
	greater(
		sub(
			body('Select')[item()]['Top'],
			body('Select')[sub(item(), 1)]['Top']
		),
		0.04
	)
)

 

 

Initialize variable

An aray variable named "Rows"

 

Initialize variable 2

A string variable named SingleRow

 

Apply to each loops over the body of Select 2:

 

body('Select_2')

 

 

Condition checks if it's a new row:

 

items('Apply_to_each')['IsRowStart']

 

 is equal to

 

true

 

 

If yes,

 in the Append to array variable SingleRow to the Rows array

 

variables('SingleRow')

 

 

and Set variable SingleRow to the current item's Text

 

items('Apply_to_each')['Text']

 

 

If no,

in the Append to string variable we add a space and the current item's Text to SingleRow

 

concat(
	' ',
	items('Apply_to_each')['Text']
)

 

 

After the Apply to each we have to add the last SingleRow to Rows with Append to array variable 2

 

variables('SingleRow')

 

 

The final Compose 2 skips the first item in Rows (it's empty)

 

skip(variables('Rows'), 1)

 

 

Chriddle_0-1713858738460.png

Hi @Chriddle , thanks so much for your patience and assistance - it is great appreciated!

Hi @Chriddle,

 

As before thanks so much for your help.

 

One question - on the flow for for the first Select you appear to have manual flow connectors entitled 'Text' and 'BoundingBox' but I can't locate them from the options? Sorry, it's probably something so simple.

 

David

I assume this is a UI display flaw.
These are just the expressions described above:

Map Text:

item()['Text']

Map Top:

item()['boundingBox']['top']

 

Thanks @Chriddle as ever.

 

Sorry, but I'm just the attached message when I test the flow on my first Select. I've run a check of the code and it appears to be correct?

Thanks again.

 

The Input of your Compose is wrong. It's not JSON formatted 😉

Check it wtih the above mentioned validator tool. (Or just use my JSON from above)

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (725)