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

Tracked Properties - MySQL Get Rows - Select Query

I'm trying to determine if tracking the outputs of my select query is a way to speed up the amount of time it takes to run my flow.

 

My Outputs are pretty straight-forward but they differ depending on what my tracking attempts are:

[
{
"@odata.etag": "",
"ItemInternalId": "ef9d1984-ccc8-4c45-810d-0a4edc0a37b8",
"id": 1337,
"email": "an@email.address",
"first_name": "some",
"last_name": "person"
}
]
 
or
 
{
"@odata.context": "https://mysql-----')/items",
"value": [
{
"@odata.etag": "",
"ItemInternalId": "62e26d3f-29a4-4469-be89-0dd21c4d7724",
"id": 1337,
"email": "an@email.address",
"first_name": "some",
"last_name": "person"
}
]
}

 

 

My most common error is "TrackedPropertiesEvaluationFailed." when I try things that look like

"@triggerBody('value').'first_name'"

 

 

However, I did get an "Encountered internal server error." when I tried to do something like 

"@parameters('value').email"

 

This is all being done in the context of an Apply to each.

 

Any help would be greatly appreciated.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Regular Visitor

Reading this article: http://johnliu.net/blog/2018/10/hiding-your-microsoft-flow-valuables-i-mean-variables-out-of-sight

there was this statement that says "Unfortunately, an auction can't reference itself"

 

I took that and decided to go in another direction, create variables outside the loop and just set them inside the loop within their own loop and thankfully that worked like a charm. The objective of making my flow run faster is sufficiently met, so I'm moving on to the next challenge. 

 

GetImage (5).png

 

Thanks @abm for your attention.

View solution in original post

7 REPLIES 7
Super User III
Super User III

Hi @eued 

 

Could you try using the below expression please?

 

triggerBody()?['first_name']



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Regular Visitor

Thanks @abm 
 
I tried this at one point and got the following as inputs in the subsequent Compose.
 
{
"userID": null,
"firstName": null,
"lastName": null,
"emailAddy": null
}
 
 
A Peek at the Code View shows something like this:
 
(encodeURIComponent('[database].[table]'))}/items",
"queries": {
"$filter": "id eq @{items('Apply_to_each_4')?['unique_id']}",
"$select": "id, email, first_name, last_name"
},
"authentication": {
"type": "Raw",
"value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
}
},
"trackedProperties": {
"userID": "@triggerBody()?['id']",
"firstName": "@triggerBody()?['first_name']",
"lastName": "@triggerBody()?['lasnt_name']",
"emailAddy": "@triggerBody()?['email']"
},
 
I feel like I should be doing something with item() ... is body() even defined at this point in the process? Is what I'm trying to do even possible given the constraints of my querying the database inside of a loop?
Super User III
Super User III

Hi @eued 

 

Thanks for your reply. Could you please post a screenshot of your flow?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Regular Visitor

@abm GetImage.png

Super User III
Super User III

Hi @eued 

 

Thanks for the screenshot. Your flow look ok to me. Yes you can call database queries from a loop. You did mentioned about some errors. So in which step exactly you are getting these? I am kind of lost here?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Regular Visitor

@abm 

Admittedly, I'm throwing spaghetti on the wall for some of this stuff. I thought it would be super straight forward with triggerBody() but, I was wrong.

 

I just ran a couple examples of the types of errors I've encountered. 

 

item.pngparamaters.png

Regular Visitor

Reading this article: http://johnliu.net/blog/2018/10/hiding-your-microsoft-flow-valuables-i-mean-variables-out-of-sight

there was this statement that says "Unfortunately, an auction can't reference itself"

 

I took that and decided to go in another direction, create variables outside the loop and just set them inside the loop within their own loop and thankfully that worked like a charm. The objective of making my flow run faster is sufficiently met, so I'm moving on to the next challenge. 

 

GetImage (5).png

 

Thanks @abm for your attention.

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (16,184)