Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

How can I length the output with condition?

(0) ShareShare
ReportReport
Posted on by 20

I want to add a condition to count the length of the output that I loop for the get item. Now I'm using 'apply to each' for the loop then get items from Sharepoint, then show. I already write the expression like this one length(outputs('Get_items')?['body/value']) 

 

how should I write the condition after that? I would like to write a condition that counts the length of the item that I get from Sharepoint and has the column value equal to x or y . In Sharepoint, the data type of the column that contains the value x and y is choices.

 

Thanks in advance for the answer.

  • dinerogs Profile Picture
    20 on at
    Re: How can I length the output with condition?

    Hi, @Expiscornovus, thanks for previous answer

    I've added a condition in the Query Filter field of the Get List action. It is user-selected system name and date filters. But I want to count how many transactions in the system and the date I selected have the analyzing status, waiting for acceptance status, or completed. I want to count these data according to the conditions.

     

    The dataset is below

    DateSystemStatus
    2023/02/26Abc

    Analysis

    2023/02/26Def

    Complete

    2023/02/26Abc

    Complete

    2023/02/25Abc

    Analysis


    if user select 2023/02/26 and system name is Abc

    the result should be like:

    Analysis: 1

    Complete: 1

     

    It's a bit complicated. Or if you have another method, please suggest.

  • Expiscornovus Profile Picture
    31,637 Most Valuable Professional on at
    Re: How can I length the output with condition?

    Hi @dinerogs,

     

    The Get Items action also has a query option, the Filter Query field.

     

    You might be able to add something like the below in that Get Items action:

    (Column eq 'x') or (Column eq 'y')

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow