web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : BAHUdP0KwZYjcNODXa9DIi
Power Automate - Building Flows
Answered

help returning single value from Get Items into variable

Like (0) ShareShare
ReportReport
Posted on 6 Aug 2020 16:06:31 by 354

Hi,

I have a flow, and we use an Admin Settings table like the below to store email addresses for different email steps in the flow:

Admin Settings.JPG

 

so in the Flow I have a Get Items with an ODATA Filter query on the Setting1 column:

Get Items.JPG

 

then I use a Filter Array step to return just the records where Setting2=Retail Marketing Team Email

FilterArray.JPG

After this I want to retrieve the Value1 column that has the string of concatenated email addresses in it, into a variable:

There will only ever be one record in the (filtered) dataset so I want to use a JSON formula like this to populate my string variable:

 

body('Filter_array_-_Get_Retail_Marketing_Team_Email')?[0]?['value1']

 

 

 but the value returned is either empty, or when I try something  else I get a flow fail error like this:

Unable to process template language expressions in action 'debug_values' inputs at line '1' and column '2892': 'The template language expression 'body('Filter_array_-_Get_Retail_Marketing_Team_Email')?['Value']?[0]?['value1']' cannot be evaluated because property 'Value' cannot be selected. Array elements can only be selected using an integer index

 

what am I doing wrong?

 

I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on 07 Aug 2020 at 07:15:46
    Re: help returning single value from Get Items into variable

    Hi @livingstonep,

     

    The reason why the expression did not find the value1 is that the property name is not correct, please pay attention to Uppercase of the "Value1".

    Please have a try the following expression:

    body('Filter_array_-_Get_Retail_Marketing_Team_Email')[0]?['Value1']

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • livingstonep Profile Picture
    354 on 06 Aug 2020 at 16:38:08
    Re: help returning single value from Get Items into variable

    thanks for your reply but I get this error:

     

    Unable to process template language expressions in action 'debug_values' inputs at line '1' and column '2893': 'The template language function 'first' expects its parameter be an array or a string. The provided value is of type 'Null'

  • PrasadAthalye Profile Picture
    on 06 Aug 2020 at 16:15:58
    Re: help returning single value from Get Items into variable

    Try using First function... Something like below in my code...

     

    first(body('Get_items')?['Value'])?['FileID'])

     

    So I guess it might be something like

    first(body('Filter_array_-_Get_Retail_Marketing_Team_Email')?['value1'])

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete