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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,050)