This week I needed to use the List Records function, and I realized that I had no idea how to use the filters. Thank you Jonas Rapp for creating the FetchXML Builder!! The function “Flow List parameters” saved my day:)
![](http://crmkeeper.files.wordpress.com/2019/07/image-013.png)
![](http://crmkeeper.files.wordpress.com/2019/07/image-005-1.png)
Simple filters
Let’s begin with the simple filters where I get a contact with the last name of Sandsør
![](http://crmkeeper.files.wordpress.com/2019/07/image-001-1-e1562841797529.png)
![](http://crmkeeper.files.wordpress.com/2019/07/image-002-1.png?w=412)
![](http://crmkeeper.files.wordpress.com/2019/07/image-004-1.png?w=417)
![](http://crmkeeper.files.wordpress.com/2019/07/image-003-1.png?w=392)
Test your search result with the Execute button so see that anything is actually returned. Then open the Flow List Parameters
![](http://crmkeeper.files.wordpress.com/2019/07/image-005-1.png?w=341)
The tool converts the Fetch XML, and magically gives the correct filter to add in our FLOW query. It can’t get much simpler than that!!
![](http://crmkeeper.files.wordpress.com/2019/07/image-006-1.png?w=326)
Lookups
Lookups act a little bit different with the syntax, as lookups always to. This got me quite confused before finding this tool, because I was not getting match to my result.
![](http://crmkeeper.files.wordpress.com/2019/07/image-012.png?w=537)
I am searching for contacts with a given GUID. In my case I didn’t know what the GUID was, so I randomly generated a GUID for the formula. In FLOW I substituted the GUID part of query with a dynamic variable.
Filter Query with lookups, you need to add “_” as seen above. When working with lookup you won’t get at match without the “_LookupField_Value”.
Filter linked entity
The last filter is a little more complex, and might not get used due to some limitations of Odata (Must match on unique ID for related).
In this scenario I wanted to locate all contacts with last name “Sandsør” where the regarding accountID = GUID.
![](http://crmkeeper.files.wordpress.com/2019/07/image-007-1.png?w=431)
Choose the main entity on top, and add “link-entity”
![](http://crmkeeper.files.wordpress.com/2019/07/image-008-1.png?w=397)
Make sure you have the correct relationship here. Some Lookups support more than one entity, and therefore you make sure you have the correct one.
![](http://crmkeeper.files.wordpress.com/2019/07/image-010-1.png?w=706)
![](http://crmkeeper.files.wordpress.com/2019/07/image-005-1.png?w=341)
Again we find the magic with the “Flow List Parameters“.
![](http://crmkeeper.files.wordpress.com/2019/07/image-011.png?w=749)
In this scenario we also get Expand Query result that we need to copy/paste.
Apply to Each
Once you have figured out what filter to use, you can select the “Apply to Each” function, and add custom logic in here.
![](http://crmkeeper.files.wordpress.com/2019/07/image-014.png?w=609)