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

Automated query to email Flow (OData issue)

Hi All,

 

We have a working flow that needs a minor update, but having a nightmare figuring out how to tell flow where the data for it is.

 

Rundown:

  • Scheduled every hour.
  • List all records (Filtered and expanded query).
  • Compose to count the list (for condition)
  • Initiate Variable for the Email body's HTML content (ending at the table creation).
  • Loop to compose the table of the email body HTML into the variable.
  • Finish the HTML email body into the variable.
  • Condition to end the flow if the count is zero and send an email with the info if not.

Here is the flow.

 

JohanBadenhorst_1-1626095028022.png

JohanBadenhorst_2-1626095129654.png

JohanBadenhorst_3-1626095230651.png

JohanBadenhorst_4-1626095326941.png

 

This is currently working fine. 

Except for the fact that the Owner is coming through as an ID.

 

Here is an example (redacted):

 

JohanBadenhorst_5-1626095570754.png

 

 

The info we need is being pulled and can be found in the RAW data of a successful run.

This is being output as:

 

 

"_ownerid_value@OData.Community.Display.V1.FormattedValue":"Johan Badenhorst"

 

 

Is anyone aware of how to use this info in my for loop instead of the "Owner (Value)" entity I have configured now?

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @JohanBadenhorst ,

This is because the Owner field is the field that gets use information from another table, it will display “user ID” by default.

You could use “Get a row by ID” action to get the user name from User entity before the “Append to string variable” action:

valbaimsft_0-1626164514631.png

 

I do a comparison in my example, see my result:

valbaimsft_1-1626164514635.png

 

valbaimsft_2-1626164514639.png

Best regards,

Allen

View solution in original post

1 REPLY 1
v-albai-msft
Community Support
Community Support

Hi @JohanBadenhorst ,

This is because the Owner field is the field that gets use information from another table, it will display “user ID” by default.

You could use “Get a row by ID” action to get the user name from User entity before the “Append to string variable” action:

valbaimsft_0-1626164514631.png

 

I do a comparison in my example, see my result:

valbaimsft_1-1626164514635.png

 

valbaimsft_2-1626164514639.png

Best regards,

Allen

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,084)