cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tiffany-Jo
Helper V
Helper V

Expressions of Flow

hi

 

Please kindly confirm how to correct my expression as below since error happened.

if(empty(triggerBody()?['Address']),Items('GetVendorInfor')?['Address'],triggerBody()?['Address'])
 
The template validation failed: 'The workflow action 'Initialize_variable' at line '1 and column '5366' references the action 'GetVendorInfor' of type 'ApiConnection': only the actions of type 'foreach' are allowed to be referenced by 'repeatItems' or 'items' functions.'.
 
キャプチャ.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Tiffany-Jo 

 

 

if(empty(triggerBody()?['Address']),body('GetVendorInfor')?['value']?[0]?['Address'],triggerBody()?['Address']) 

 

This body('GetVendorInfor')?['value']?[0]?['Address'] will give you the first Address value from the GetVendorInfor action

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

2 REPLIES 2
abm
Super User
Super User

Hi,

 

Believe your second step is Get Items (Sorry it's not in English) which can return one or more items. So the next step must be a for each loop. Also you need to declare the initialise variable before your Get Items step. Later use the intialise varaible inside the for each loop using the flow action setp Set variable.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

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 blogPower Automate Video Tutorials
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Tiffany-Jo 

 

 

if(empty(triggerBody()?['Address']),body('GetVendorInfor')?['value']?[0]?['Address'],triggerBody()?['Address']) 

 

This body('GetVendorInfor')?['value']?[0]?['Address'] will give you the first Address value from the GetVendorInfor action

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Users online (1,415)