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 / Variable.count not val...
Power Automate
Answered

Variable.count not valid name error

(0) ShareShare
ReportReport
Posted on by 8

Hello, I'm trying to create a workflow in which I search my mailbox for all emails from my supplier and download the invoices. I created a loop to download the invoices but I can't determine that the end of the loop is the number of emails found because it says that the Count property is not valid. How can I resolve this?

 

error .count.png
I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Hi @Hernani93 

    @Please try to give

    %Retrieveemails.count%

    Please check in this way 

    Put your variable inside %%

     

    Hope this helps

    Usha

  • eetuRobo Profile Picture
    4,579 Super User 2026 Season 1 on at

    You seem to have enabled the Power Fx (preview) in your flow. Then the syntax Power FX and so a bit different.
    Try:
    =CountA(RetrievedEmails)
    If its a datatable use:
    =CountRows(RetrievedEmails)

     

  • Hernani93 Profile Picture
    8 on at

    i tried to do that and still doesnt acept the variable

  • Hernani93 Profile Picture
    8 on at

    I tied your solution but não it says that the first argument CountA shoud be a column in a table but i i have a list

     

  • Verified answer
    eetuRobo Profile Picture
    4,579 Super User 2026 Season 1 on at

    For me that worked when I created an input variable list.

    eetuRobo_0-1706609752139.png

     

    eetuRobo_3-1706609954410.png

     



    eetuRobo_1-1706609752140.png


    Can you show how your variables look like?

    Do you need the Power Fx functionality? If possible I think you should consider making a new flow without Power Fx turned on. That is still in preview and doesn't support many normal functionality.

    eetuRobo_2-1706609845089.png

     

    Then you can get the count like @UshaJyothi20 instructed.

  • Hernani93 Profile Picture
    8 on at

    I created a new flow without the fx option and now its working thanks for the advice

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard