Skip to main content

Notifications

Community site session details

Community site session details

Session Id : loDDMF7oXnXKEzfNeWLOag
Power Automate - General Discussion
Answered

Filtering Numbers from Given Array in Power Automate

Like (0) ShareShare
ReportReport
Posted on 27 Nov 2023 06:24:15 by 162

Hi  @Power @automate @AutoMatey @automate3 @IAutomate @HAutomate @PowerAutomate @powerautomater1 @yipowerautomate @powerautm12 @powerautomate88 @powerautomate17 @o365_comunity ,

 

I'm working on a Power Automate flow where I have an array of values. The array includes a string. Here is the array:

[
"Current Date/Time",
"1",
"Invoice ID Customer",
"Customer ID",
"Customer tax ID",
"Customer name",
"Customer address",
"Customer address recipient",
"8",
"Billing address recipient",
"Due date",
"Payment terms",
"Invoice amount",
"Amount due",
"Purchase order ID",
"Previous unpaid balance",
"Remittance address",
"Remittance address recipient",
"Service address",
"Service address recipient",
"Service start date",
"End date",
"Shipping address",
"Shipping address recipient",
"Subtotal",
"25",
"Vendor tax ID",
"Vendor name",
"28 ",
"Vendor address recipient"
]

 

I would like to filter out the numbers from this array, so I'm left only with the string values. How can I achieve this in Power Automate? Any guidance or sample flow would be greatly appreciated.

 

hitakshi_0-1701066196234.png

 

 

 

Thank you in advance!

Hitakshi

  • Verified answer
    v-jefferni Profile Picture
    on 27 Nov 2023 at 08:13:09
    Re: Filtering Numbers from Given Array in Power Automate

    Hi @hitakshi ,

     

    You can use isInt function.

    vjefferni_0-1701072711208.png

    vjefferni_1-1701072764358.png

     

    To get string values instead of numbers, change the order or elements in the if statement:

    if(isInt(item()),'',item())

     

    Best regards,

  • Gdarmon Outlook Profile Picture
    372 on 27 Nov 2023 at 07:18:20
    Re: Filtering Numbers from Given Array in Power Automate

    try this

    Check if a variable is numeric - Power Automate | Microsoft Learn

     

  • hitakshi Profile Picture
    162 on 27 Nov 2023 at 06:44:03
    Re: Filtering Numbers from Given Array in Power Automate

    Hi @DarmonGill 
    But 'isNumeric' is not defined or not valid.' In Power Automate.

  • Gdarmon Outlook Profile Picture
    372 on 27 Nov 2023 at 06:39:07
    Re: Filtering Numbers from Given Array in Power Automate

    In Power Automate, you can use the "Filter array" action combined with an expression to achieve this task. You can create a flow that filters out the numeric values from the array of strings using the isNumeric function available in Power Automate.

    Here are the steps to achieve this:

    1. Initialize your array: Set up an action to initialize your array of values.

    2. Filter array action: Add a "Filter array" action in your flow.

    3. Set the Filter array action configuration:

      • Use the expression not(isNumeric(item())) or isString(item()) within the Filter array action. This expression checks if the current item in the array is not a number.

    Gill

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,786 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard