cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NoodlesMurdoc92
New Member

Can I retrieve the value of an item that is in the same row in a Sharepoint list

So I have a list with two columns, and the columns look more or less like this:

 

NumberName
3James
4Joe
5Patrick
6Delilah
7Megan
8Barbara
9Lisa

 

 

I have a flow that will end up giving a variable with an integer numeric value, and this value has to be found in the list and retrieve the corresponding name. For example, if it happens that variable=5, I want the flow to come in and give me back the value "Patrick". And so on.

 

I have previously tried to do something similar using tasks inside a bucket in Planner, but for some reason it did not work. 

 

Is it possible to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @NoodlesMurdoc92 ,

Whether do you want to get the result by totally using flow or partly using flow?

"I have a flow that will end up giving a variable with an integer numeric value", based on this sentence, I assume that the flow has an output of a variable.

Then the rest of the feather could be made in powerapps.

I suggest you set like this:

1)in the end of the flow, add this action: response to powerapps

910.PNG

 9101.PNG

 

fill in the formula that represent the resulted variable in this action.

 

2)In powerapps, you could use this formula to get this variable:

Set(variable,flowname.Run(....).result)

3)you could get the Name value by using this formula:

LookUp(datasourcename,Number=variable,Name)

 

Do not forget to connect your app with that data source and the flow.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

9 REPLIES 9
achi
Advocate III
Advocate III

Hi NoodlesMurdoc92

 

You can use the Lookup Function to return the required Value. LookUp( Table, Formula [, ReductionFormula ] )

For your example:

LookUp(<Your SharePointList>, Number = 5, Name)

 

This will return the Value of the Column "Name" for the Number 5.

 

Regards

achi

Adam1986
Frequent Visitor

I don't have full picture of your problem, but i think You need to FILTER your list by column Number is equal to your variable ( 5 in this example ), then SELECT Name value from FILTER outcome. 

Adam1986
Frequent Visitor

@achi i was confused because @NoodlesMurdoc92 wrote he wants flow to return name value, but still we are in PowerApps Help.

 

Hello achi,

 

Sorry beforehand because I am really new and I don't really understand what you mean.

 

How would I be able to do this in Flows. Should I insert that formula in an expression or something like that? 

@achi provided You PowerApps solution for Your problem, probably because we are in PowerApps Help section 😉

If You want do it in flow, check my previous replays.

Hello @Adam1986 ,

 

I tried to filter and I think it is the right way, I get as an output an array with all the data columns of the condition established in the filter.

 

The problem now comes when I try to select that specific column of the value, with the SELECT DATA option. This opens automatically an APPLY EACH box, and even if I try to fill in the fields with the "filtered item" the column "Name" that I want to choose, it keeps opening APPLY EACH boxes.

 

Is there a way to do this that I do not know about? 

achi
Advocate III
Advocate III

Adam1986 is completely right, I expected it to be a PowerApp Question.

 

However, in Flow you could use the following:

Use the "Get Items" SharePont Action to get the list content, filtered by following Odata Query (->Advanced Options):

 

Get ItemsGet Items

 

This will return all items with matching number. 

As this action can return more than 1 result, you need the following expression to access the first record of the result:

 

 

outputs('Get_items')?['body/value'][0]['Name']

 

 

 

( [0] -> Because you want to access the first record of the returned items)

 

Note: Just saw that you replied in the same time, however the second part of my tip could help you solving the "foreach" issue.

 

Regards

Achi

Could You provide screen how your flow looks? I could be more specific if You do.

v-yutliu-msft
Community Support
Community Support

Hi @NoodlesMurdoc92 ,

Whether do you want to get the result by totally using flow or partly using flow?

"I have a flow that will end up giving a variable with an integer numeric value", based on this sentence, I assume that the flow has an output of a variable.

Then the rest of the feather could be made in powerapps.

I suggest you set like this:

1)in the end of the flow, add this action: response to powerapps

910.PNG

 9101.PNG

 

fill in the formula that represent the resulted variable in this action.

 

2)In powerapps, you could use this formula to get this variable:

Set(variable,flowname.Run(....).result)

3)you could get the Name value by using this formula:

LookUp(datasourcename,Number=variable,Name)

 

Do not forget to connect your app with that data source and the flow.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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
PA 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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (74,034)