Filter query in workflow sharepoint

%3CLINGO-SUB%20id%3D%22lingo-sub-1436077%22%20slang%3D%22en-US%22%3EFilter%20query%20in%20workflow%20sharepoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1436077%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20filter%20query%20in%20workflow%20to%20get%20items%20from%20List%2C%3C%2FP%3E%3CP%3Emy%20column%20name%20is%20Vendors%20which%20having%20type%20of%20Group%2Fusers%20and%20I%20am%20making%20following%20query%20on%20Vendors%20Column%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVendors%20eq%20'%40%7Bvariables('varGroupName')%7D'%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20I%20am%20not%20getting%20result%2C%20I%20have%20matching%20data%20in%20list%20which%20should%20return%20at%20least%20one%20record%20from%20list.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eis%20this%20due%20to%20my%20list%20item%20column%20type%20is%20Group%2FUsers%20and%20I%20am%20comparing%20it%20with%20string%3F%3C%2FP%3E%3CP%3Ei%20want%20to%20compare%20it%20with%20string%20then%20what%20changes%20need%20to%20do%3F%3C%2FP%3E%3CP%3EMy%20groups%20displayname%20is%20same%20as%20string%20I%20am%20comparing...how%20to%20make%20comparision%20in%20query%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1436077%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1458039%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20query%20in%20workflow%20sharepoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1458039%22%20slang%3D%22en-US%22%3EHi%2C%20since%20it%20is%20like%20a%20lookup%20column%2C%20you%20cannot%20use%20the%20field%20name%20directly%2C%20it%20has%20to%20be%20expanded%20and%20the%20expanded%20field%20has%20to%20be%20used.%20If%20you%20are%20filtering%20using%20the%20user%2Fgroup%20id%20then%20it%20has%20to%20be%20Vendors%2FId%20eq%20'%40%7Bvariables('varGroupName')%7D'.%20If%20you%20are%20using%20the%20user%2Fgroup%20name%20then%20it%20has%20to%20be%20Vendors%2FTitle%20eq%20'%40%7Bvariables('varGroupName')%7D'%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I am using filter query in workflow to get items from List,

my column name is Vendors which having type of Group/users and I am making following query on Vendors Column

 

Vendors eq '@{variables('varGroupName')}'

 

but I am not getting result, I have matching data in list which should return at least one record from list.

 

is this due to my list item column type is Group/Users and I am comparing it with string?

i want to compare it with string then what changes need to do?

My groups displayname is same as string I am comparing...how to make comparision in query?

1 Reply
Hi, since it is like a lookup column, you cannot use the field name directly, it has to be expanded and the expanded field has to be used. If you are filtering using the user/group id then it has to be Vendors/Id eq '@{variables('varGroupName')}'. If you are using the user/group name then it has to be Vendors/Title eq '@{variables('varGroupName')}'