So I have a list with two columns, and the columns look more or less like this:
Number | Name |
3 | James |
4 | Joe |
5 | Patrick |
6 | Delilah |
7 | Megan |
8 | Barbara |
9 | Lisa |
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?
Solved! Go to Solution.
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
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,
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
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.
@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?
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 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.
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
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,
User | Count |
---|---|
251 | |
106 | |
96 | |
50 | |
39 |