Hi There,
I am trying to trigger a csv report from a Sharepoint list to pull together rows that have a column value in common. I have added trigger buttons to the list, and it does indeed work.
The problem is, I can only create my csv table with all rows. Or if I use ID from the previous stage, I can have just that single row.
What I want is all the rows with some other column values in common.
For example, if my chosen row contains Modified By 'Tom', I would like flow to collect all records modified by Tom.
But I want to return all items modified by the same person as the selected row. I have no static interest in Tom.
I only have ID available from my Selected Item, and no other columns to draw from.
What would be the syntax for that in my Filter Query?
Or is there some other way of doing this at the front end with my trigger button?
Many Thanks in advance for any help
Max
My flow...
For CertNo use a Flow like the one in my previous post and in the OData query line add a filter that uses the CertNo dynamic content that was retrieved in the Get Item action. In the OData query type the following and then add the CertNo field from the dynamic content panel
CertNo eq '<CertNo Field Goes Here>'
Thank you @Pstork1 and @v-litu-msft for your help. It is much appreciated.
I have tried at the solutions provided, but I feel they are relying on a static filter query unless I am misunderstanding (entirely likely!) I don't always want to find just Tom. I'm looking for a more dynamic lookup.
So, I am still struggling with this, let me illustrate the scenario better, as I'm sure this must be possible:
In this example table below, how would I create the filter query to return all rows that share the same CertNo as the row I click the Flow button on.
So if I clicked the button on the....
Top row - 3 records would be returned (IDs 1,2,& 6), as they all share the CertNo of '123456'
Third row - 2 records (IDs 3 & 5), all with CertNo '959595'
Data | CertNo | ID | Button |
Good | 123456 | 1 | [Run Flow] |
Bad | 123456 | 2 | [Run Flow] |
Ugly | 959595 | 3 | [Run Flow] |
Good | 654321 | 4 | [Run Flow] |
Bad | 959595 | 5 | [Run Flow] |
Ugly | 123456 | 6 | [Run Flow] |
I hope this makes sense, and thanks again.
Hi @maxtarneberg,
This is the syntax of the Filter query:
Operator | Description | Example |
---|---|---|
Logical Operators | ||
Eq | Equal | /Suppliers?$filter=Address/City eq 'Redmond' |
Ne | Not equal | /Suppliers?$filter=Address/City ne 'London' |
Gt | Greater than | /Products?$filter=Price gt 20 |
Ge | Greater than or equal | /Products?$filter=Price ge 10 |
Lt | Less than | /Products?$filter=Price lt 20 |
Le | Less than or equal | /Products?$filter=Price le 100 |
And | Logical and | /Products?$filter=Price le 200 and Price gt 3.5 |
Or | Logical or | /Products?$filter=Price le 3.5 or Price gt 200 |
Not | Logical negation | /Products?$filter=not endswith(Description,'milk') |
Arithmetic Operators | ||
Add | Addition | /Products?$filter=Price add 5 gt 10 |
Sub | Subtraction | /Products?$filter=Price sub 5 gt 10 |
Mul | Multiplication | /Products?$filter=Price mul 2 gt 2000 |
Div | Division | /Products?$filter=Price div 2 gt 4 |
Mod | Modulo | /Products?$filter=Price mod 2 eq 0 |
Grouping Operators | ||
( ) | Precedence grouping | /Products?$filter=(Price sub 5) gt 10 |
If you want to get the items modified by Tom directly in the filter query of the Get items, I think it is hard to do, because of the Midified by field is a column of personality type, the displayName could not be used in filter query.
How about using the filter query action after Get items without any filter? It could achieve your requirement:
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.
Just add a Get Item action (not get Items) just before the existing Get Items action. Then use the ID from the selected Item trigger. That should give you access to the fields you need to create an OData query in the Get Items.
Hi @Pstork1
Thank you for your quick response.
I'm not I follow though, sorry.
Does that mean create another Get Items stage?
I don't know how to draw all my other fields from the Selected Item from the trigger
Would it be possible for you to elaborate please?
Thank again
Using the ID from the Selected Item you can always do a Get Item to get the values for that item, but you should have all the fields in the selected item available from the trigger. Then use those values in a Get Items OData query filter or for Filtering the array of the items returned in a Get items.