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 query...
Power Automate
Answered

Get items filter query with leading zero

(0) ShareShare
ReportReport
Posted on by 1,599 Super User 2024 Season 1

Hello,

 

For a project I'm working on, I have two SharePoint lists. One where rows of employee data is written to, specifically with a column named "EmployeeID" where some will start with "1234" and others will start with "01234" and "001234".

 

When this data is added, an email is sent to the employee with a link to a form in MS Forms - on form completion, that data is then added to a separate list. There is an action in that which copies the EmployeeID from AzureAD into these list items and we use this as an identifier to compare and link data between both lists.

We use a Get Items action with a Filter Query to compare the EmployeeID column on List1 with the EmployeeID column on List2.

If they both match, then we have an Update Item action beneath this to essentially change a status column.

sudosaurus_0-1643364502372.png

This works well for most items however for ones that start with a leading zero or multiple leading zeros then the flow fails at this point with the below error:

 

sudosaurus_1-1643364730500.png

 

{
 "status": 400,
 "message": "The expression \"EmployeeID eq 02040\" is not valid. Creating query failed.\r\nclientRequestId: 7d47750c-ff63-4ce0-a6ea-9cb563e53bd7\r\nserviceRequestId: 7d47750c-ff63-4ce0-a6ea-9cb563e53bd7"
}

 


This is obviously due to the leading zeros - does SharePoint not like them? and is there a way around this to match the columns up as they need to be in there to match the data from AzureAD.

 

Thanks 🙂

 

The problem we are having is that 

Categories:
I have the same question (0)
  • Verified answer
    sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    Literally just found a solve on another post after posting this one!

     

    I had to wrap the second EmployeeID below in single quotes '' and then it worked! 😄

    sudosaurus_0-1643365493562.png

     

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard