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 Platform Community / Forums / Power Automate / Get number of digits o...
Power Automate
Unanswered

Get number of digits of each value found in Filter Array

(0) ShareShare
ReportReport
Posted on by 30

Hello. I have made a Filter Array to find values that meet a condition. I would like to get the number of digits of each value found, because the value I am looking for has only 10 digits and that can get this value to update a field. Thank you for the help.

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @alopezppm ,

     

    If you add another filter array to your flow as below it should work.

    Input value is the output of the first filter array

    length(item()) is the expression on the left side

     

    soysalf_0-1618179896119.png

     

  • alopezppm Profile Picture
    30 on at

    Hello. It vives me the following error: The template language función 'length' expectativas its parameter yo be andado array or a string. The provided value is of type 'Object'.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @alopezppm ,

    Would you please send screenshots of your flow? What does the output of your first filter array look like?

  • alopezppm Profile Picture
    30 on at

    Hello again. First, I parse JSON from the readResults of Al Builder and after the Filter Array what has the following: From: Body('Parse_JSON'), text starts with string(45). This extracts the values starting with 45. The value that I need has only 10 digits, that's why I need to add this filter. Thank you.

  • alopezppm Profile Picture
    30 on at

    Could you use two conditions in the filter array? With string (45) and length (10). I don't know exactly how to apply it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @alopezppm ,

    Since there are no screenshots of your flow, it is a bit hard to imagine, however I cannot imagine any problems about using another filter array after parsing your JSON and applying your first filter array. 

    soysalf_0-1618315215206.png

     

  • alopezppm Profile Picture
    30 on at

    Good afternoon; I share screenshots. I have tried to do the Filter array 2 and it gives the following error:

    Captura de pantalla 2021-04-13 161005.png

    Captura de pantalla 2021-04-13 160657.png

    And here os the output that I need to filter again with the lenght 10.

     

    [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "text": "4500051817",
    "location": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "page": 1,
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.44460847783734075,
    "top": 0.4834707210288685,
    "width": 0.09765365021357958,
    "height": 0.007550622520180628,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.44460847783734075,
    "y": 0.4834707210288685
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5422621280509203,
    "y": 0.4834707210288685
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.5422621280509203,
    "y": 0.49102134354904914
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.44460847783734075,
    "y": 0.49102134354904914
    }
    ]
    }
    }
    }
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "text": "4500051817",
    "location": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "page": 2,
    "boundingBox": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "left": 0.01577947458221905,
    "top": 0.44219455465864,
    "width": 0.09766575103764566,
    "height": 0.007559173621562498,
    "polygon": {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "coordinates@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
    "coordinates": [
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.01577947458221905,
    "y": 0.44219455465864
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.11344522561986471,
    "y": 0.44219455465864
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.11344522561986471,
    "y": 0.4497537282802025
    },
    {
    "@odata.type": "#Microsoft.Dynamics.CRM.expando",
    "x": 0.01577947458221905,
    "y": 0.4497537282802025
    }
    ]
    }
    }
    }
    }
    ]

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @alopezppm ,

    The failing part is the parsing JSON, not the second filter array.  I would suggest generating your JSON schema again.

  • alopezppm Profile Picture
    30 on at

    Hello. The Parse JSON works now, but the Filter Array has the following error. I have used the expression length(item()) in the left side and the value 10. The problem is the type.

     

    Captura de pantalla 2021-04-15 194202.png

  • alopezppm Profile Picture
    30 on at

    How I can filter the type object? In the JSON is the properties (text).

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 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard