We are exploring OCR capabilities for invoice processing. This is the article which may help you to understand how it work if you want to train a custom model to use it then with Power Automate.
Do you want your own OCR which costs less than a coffee?
Using the Capacity page in the Power Platform Admin Center we can extract the details of size occupied by table (in MB) within a particular environment.
Login to the admin portal and navigate to Capacity
Things to pay attention to while following the steps:There are two types of settings required for a portal: Settings and Site Settings. Pay attention.
Create a container in the Azure storage you created. Microsoft docs are missing this but itโs definitely required. It doesnโt get created automatically you have to create it on Azure portal.
There extra portal settings which may or may not be required. Doesnโt hurt to set them up:
Site Setting 3Name: HTTP/Access-Control-Allow-Credentials Value: true
Site Setting 4Name: HTTP/Access-Control-Allow-Headers Value: *
Site Setting 5Name: HTTP/Access-Control-Allow-Methods Value: GET, PUT, DELETE, HEAD, POST
Site Setting 6Name: HTTP/Access-Control-Allow-Origin Value: <your crm url without any trailing slash>
Site Setting 7Name: HTTP/Access-Control-Expose-Headers Value: *
Site Setting 8Name: HTTP/Access-Control-Max-Age Value: 300 (itโs value in seconds, you can specify 200/ 100 as well)
Within Power Automate I am trying to make SINGLE(paginated) call to Dataverse to get the list of Work Orders with the particular status linked to Account but not directly but via extra layer. Also, I can retrieve extra lookup tables which are required by logic.
All in a single call because making extra API calls is expensive and evil! ๐
The FetchXML query looks like one below:
Query WO for Clients
I build my queries in XrmToolBox. It’s free community tools but don’t forget to support people who build tools and donate money to say Thank You!
If you try to use Web API query instead you get the error like one below:
{“error”:{“code”:”0x0″,”message”:”The navigation property ‘msdyn_account_msdyn_workorder_ServiceAccount’ cannot be expanded. Only many-to-one relationships are supported for nested expansion.”}}
It’s easier to understand if you look at the tree structure:
If you have 1 account with 3 Work Orders you will get 3 records in the result JSON with the account info repeating 3 times in each record.
Let’s say you iterate through the list via Apply for each.
Each column regardless of table and expansion level you will query the same way in Apply for each prefixing column names with the aliases specified in FetchXML:
Recently I was working on the solution and in the middle of the development discovered that I desperately need to refer to the previous item in the loop.
Let’s say, I iterate through the list of items I received via List Rows (Dataverse). I check a condition in the next iteration and based on the condition I need to do something with the item from the previous step. I know it sounds crazy. But I will explain why in the next post, promise. For this article it doesn’t really matter why.
I need to refer to the previous item. How do I do this? I Googled. I am very good at it. Yet I couldn’t find anything which could help me thinking. Then I did. I like to be grateful so this is the link:
It’s a different topic but this is how I realized the exact steps I need to perform.
I need a variable Current Item. I am looking at referring to multiple columns of the item, not just name or ID so I can’t simple store it in the string variable. I need type Object.
2. Inside “Apply to each” I need to populate it like this:
item()
3. To read columns, in my case it’s name, of the previous item (and many other columns which I can easily access now) It’s not a current item anymore, it’s a previous item. So if you are OCD something, rename it to something like Stored Item ๐: