cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nettsales
Helper I
Helper I

missing something simple: GUID values are being converted to strings

I've searched and tested but can't find a solution to what looks like a really simple problem. 

 

I have a reporting entity and a child entity for hourly reports.  When I create a new report record I want to update all hourly reports that fit a Fetxh XML criteria.  All is working untill I go to update the child hourly report records with the Reporting GUID.

 

I get this error "The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_2')?['pp_reportinghourlyid']' is of type 'String'. The result must be a valid array."

 

the field in question is the GUID for the Hourly Reporting records I wish to update. 

 

From what I can see this flow is returning a string rather than GUID

Nettsales_0-1615469875378.png

I'm clearly doing something very obviously wrong but I can't see it?

 

1 ACCEPTED SOLUTION

Accepted Solutions
DamoBird365
Super User
Super User

Hi @Nettsales 

 

If you are looking to update a record, you will need the GUID from get record OR from a trigger if it is based on a record being created/updated etc.

 

I think you might be using when a record is created.  Take a look at the history of a run for that trigger and look for the fieldname within there.  

 

Damien

View solution in original post

4 REPLIES 4
DamoBird365
Super User
Super User

Hi @Nettsales 

 

I think it's because your items('Apply_to_each_2')?['pp_reportinghourlyid'] is an element of an array.  What is the expression for "name"?  What is the reason for you having two apply to each actions?  Do you have an array where the name element comes from as this would be the logical output for your apply to each.  

 

Damien

Nettsales
Helper I
Helper I

Ahh thanks @DamoBird365

 

I'm very new to Flow and somehow the "apply to each" had become embedded in itself.  So the flow now runs without error  but my original problem still remains!

 

I am trying to place a lookup in each of the hourly reporting records found in the list to point it towards the reporting weekly total record.  So I have added the value "name" of the Weekly record into the appropriate field on the Flow and get this error:

 

The 'inputs.parameters' of workflow operation 'Update_a_record' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/_pp_weeklytotal_value' is required to be of type 'String/uuid'. The runtime value '"Week Ending 11/3/2021"' to be converted doesn't have the expected format 'String/uuid'.

 

What this means is that the Flow is taking the text value of the record rather than the GUID.  But having tried the other possible options I can't find a field that will allow me to update the hourly report record with the GUID of the weekly reporting record:

Nettsales_0-1615482571216.png

Is there another step I am missing to generate the GUID of the weekly reporting record that is being created in an earlier step in the workflow?

 

DamoBird365
Super User
Super User

Hi @Nettsales 

 

If you are looking to update a record, you will need the GUID from get record OR from a trigger if it is based on a record being created/updated etc.

 

I think you might be using when a record is created.  Take a look at the history of a run for that trigger and look for the fieldname within there.  

 

Damien

Nettsales
Helper I
Helper I

Got it - thanks!

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,305)