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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Postal Code Filter

(1) ShareShare
ReportReport
Posted on by 19

Hi All,

 

I'm currently are making a basic form to gather user data. We want to filter requests by postal code (Canada vs America). I am able to filter American postal with length and numeric only conditions. The Canadian one is proving a bit more difficult (A1A 1A1), I've tried to pipe the user input into an array and check for letters but can't seem to get it to stick. Is there a simple way to get proper filtering in place? This is my 2nd flow so I am quite new to this.

Categories:
  • Verified answer
    trice602 Profile Picture
    16,679 Super User 2026 Season 2 on at

    Hi @Nick10 ,

     

    I think you can use a conditional action and check if your zip code contains a " ".  Works in testing.

     

    trice602_0-1696964427100.png

     

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Can you put a choice option on the form that asks what country they are located? Then just use that option response to condition and make a filter?

     

    Could you explain what exactly you mean by filter requests? Like you don't want to do anything with them? Or you want to separate the flow actions by country? Are you trying to filter a SharePoint list with zipcodes? If you talk more about what you are trying to accomplish overall, it would help me understand better.

  • Nick10 Profile Picture
    19 on at

    Hi trice

    This was also one of my idea's as well. However some people write the Canadian postal without spacing I was hoping to make a regex to check for alphanumeric if that is possible. If this is a big work around to do it with regex or alphanumeric checks then we will go with this solution and add to other checks later on.

     

  • Nick10 Profile Picture
    19 on at

    Hi wskinnermctc,

     

    That would be an option, however the system we are uploading the data into will have to be modified as well to accept a country variable which is possible but tedious (can't speak on it).  As by filtering requests the form tool is for submission requests (Can't speak on it), and based on postal (Country) they are piped into different pathways down the automation.  It is from a Microsoft Office Forms that the users are filling out not a SharePoint List. Hope this helps a bit more.

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    You don't have to pass the country selection into your other system. You just use it in the flow to determine the different actions taken if the submission was US or Canada.

     

    That's what I don't understand. You say you are filtering something with the flow; but then you say everything is going into another system. Filtering implies removing something, as in form submissions with a canada zip code need to be filtered, removed.

     

    If you want the flow to perform separate actions based on if it is a US or Canada address, then using the country selection option with the form would work. Just use the value from the option and split the flow steps.

     

    Or by filtering are you talking about scrubbing the zipcode text value to remove spaces or something so that it can go into the other system?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard