cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sudosaurus
Post Prodigy
Post Prodigy

Get items filter query with leading zero

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 

1 ACCEPTED SOLUTION

Accepted Solutions
sudosaurus
Post Prodigy
Post Prodigy

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

 

View solution in original post

1 REPLY 1
sudosaurus
Post Prodigy
Post Prodigy

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

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,045)