web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get items filter on co...
Power Automate
Answered

Get items filter on column value when column is an object

(0) ShareShare
ReportReport
Posted on by

I am trying to get items from a list and trying to limit the number of items I get via a filter on the Get Items action. I am having problems and have tried many iterations.

 

I am trying to filter the Items by the value in the column called Employee:Mobile No.

 

Here is the output of some of the first item in the list if I do a query with no filter:

 "body": {
 "value": [
 {
 "@odata.etag": "\"1\"",
 "ItemInternalId": "49718",
 "ID": 49718,
 "Title": "Rostered Day Off",
 "Employee_x003a_Mobile_x0020_No": {
 "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 "Id": 4,
 "Value": "0411111111"
 },
 "Employee_x003a_Mobile_x0020_No#Id": 4,

and here is my query

KarlInOz1_0-1679983804006.png

And the result when I run the flow is

KarlInOz1_1-1679983894765.png

 

Some of the iterations I have tried in my query are:

Employee_x003a_Mobile_x0020_No/Title eq '0411111111'

Employee_x003a_Mobile_x0020_No eq '0411111111'

Employee:Mobile_x0020_No/Value eq '0411111111'

Employee:Mobile No/Value eq '0411111111'

 

I haven't found any internet searches which seem to deal specifically with this. The only one which looked like it may work seemed to have the sub item called Title and that is why, out of desperation I tried the iteration with Title. 

 

The error states that the column does not exist when in the data returned from a query without the filter I can see it does exist so I clearly have something wrong in my syntax. 

 

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @KarlInOz1,

    Is your column which name is Employee:Mobile No a lookup column in the SharePoint list?

    If so, the format for filter lookup column should be:

    InternalFieldName/Title eq 'Lookup Value'
    InternalFieldName/Id eq 'Lookup Id'

     Where the Title is the column from the list as the source.

    I have made a simple test for your reference:1. Here is the SharePoint list with a lookup column called Employee:Mobile No

    Where the source is the list called test230328 and column CarName

    vqiaqimsft_0-1680075700606.png

     

    2.  Using the format Employee_x003a_MobileNo/CarName eq 'Car1' in Filter Query

    where

    Employee_x003a_MobileNo is the internal column name for the lookup column called Employee:Mobile No

    CarName is the source internal column name

    vqiaqimsft_1-1680075700607.png

     

    3. The result shows it was successfully filtered:

    vqiaqimsft_2-1680075700608.png

     

    Using the format InternalFieldName/Id eq 'Lookup Id' also works with the same result.

    However, if I tried to use Employee_x003a_MobileNo/Title eq 'Car1', it did not filter the condition since the Title column is not the source column that connected to.

    So please note to check the correct format of the internal column name, and get the correct column that is connected to the list.

    Here is the link for more reference:

    SharePoint - ODATA filtering by lookup values · Community (powerautomate.com)

    Hope it helps!

  • Community Power Platform Member Profile Picture
    on at

    @v-qiaqi-msft Thank you for taking the time to respond to this for me.

    Your suggestion still hasn't solved my problem but you have clarified what I should be putting in the position of 'Title'.

     

    Yes my column is a lookup column. The Internal field name is:

    KarlInOz1_0-1680126870970.png   

    KarlInOz1_1-1680126911943.png

    so it seems I should be using 

    Employee_x003a_Mobile_x0020_No

    rather than 

    Employee_x003a_MobileNo

     But even when I try 

    Employee_x003a_Mobile_x0020_No/Id eq '1'

    as my filter query I still get the result

    Column 'Employee_x003a_Mobile_x0020_No' does not exist. It may have been deleted by another user.

     

  • Community Power Platform Member Profile Picture
    on at

    I have also tried

    EmployeeMobileNo/Id eq '1'

    and

    Employee:MobileNo/Id eq '1'

    The first one fails again saying the column is not found, the second fails on bein an invalid query (understandably because of the colon.)

  • Community Power Platform Member Profile Picture
    on at

    And yet, if I remove the filter in the Get Items block, this works:

    KarlInOz1_2-1680128593475.png

    I really don't understand why the filter query fails.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    It's OK, with the help of one of my colleagues we cracked it! 🕺

    Our column Employee:Mobile No is a lookup column but, and I don't know the terminology to describe this, it is not the 'root' column; it's a sub column in some sense and seems to be invisible to the filter. The root lookup column in our list is Employee and the column in the remote list I want is Mobile No. So, the query that actually works is

    Employee/Mobile_x0020_No eq '0411111111'

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard