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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Get number of digits of each value found in Filter Array

(0) ShareShare
ReportReport
Posted on by 26

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.

I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at
    Re: Get number of digits of each value found in Filter Array

    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
    26 on at
    Re: Get number of digits of each value found in Filter Array

    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
    on at
    Re: Get number of digits of each value found in Filter Array

    Hi @alopezppm ,

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

  • alopezppm Profile Picture
    26 on at
    Re: Get number of digits of each value found in Filter Array

    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
    26 on at
    Re: Get number of digits of each value found in Filter Array

    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
    on at
    Re: Get number of digits of each value found in Filter Array

    @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
    26 on at
    Re: Get number of digits of each value found in Filter Array

    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
    on at
    Re: Get number of digits of each value found in Filter Array

    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
    26 on at
    Re: Get number of digits of each value found in Filter Array

    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
    26 on at
    Re: Get number of digits of each value found in Filter Array

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard