cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Tiffany-Jo
Level: Powered On

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
Super User
Super User

Re: Expressions of Flow

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
Super User
Super User

Re: Expressions of Flow

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!



Super User
Super User

Re: Expressions of Flow

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
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 395 members 2,998 guests
Please welcome our newest community members: