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

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
Community Champion
Community Champion

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
Community Champion
Community Champion

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
Regular Visitor

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
Community Champion
Community Champion

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

Nettsales
Regular Visitor

Got it - thanks!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,350)