cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Dual Super User
Dual 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
Highlighted
Super User III
Super User III

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!

Learn more from my blog
Highlighted
Dual Super User
Dual 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
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (4,550)