Skip to main content
Community site session details

Community site session details

Session Id : u5PJceJPGUtCDMG3XtqRj8
Power Automate - Building Flows
Answered

Set Integer Variable

Like (0) ShareShare
ReportReport
Posted on 2 Mar 2021 19:36:18 by 6

In my flow I'm using the List Rows Present in a Table action to get  information which I then use for filter values in a second List Rows Present in a Table function. One of the values which I'm pulling is a number which I would like to use as value in the Top Coun" field. I'm trying to create and set an integer variable which will be referenced in this second list rows. 

 

When I try to set the variable using the dynamic content without any changes I get the following error message: The variable 'Email Count' of type 'Integer' cannot be initialized or updated with value of type 'String'. The variable 'Email Count' only supports values of types 'Integer'. 

 

I've tried adding a compose and using the int() in numerous fashions which I've seen online, but continue to get that same error message. 

 

The text form of the content which I'm trying to change is as follows: @{items('Apply_to_each_3')?['EmailCount']}

 

Thanks in advance for any help and please let me know if I can provide more information

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on 02 Mar 2021 at 19:48:52
    Re: Set Integer Variable

    Can we get VAR involved for a replay please? 🙂 @Pstork1 that was a close one! Keyboards at the ready.

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on 02 Mar 2021 at 19:42:25
    Re: Set Integer Variable

    Hi @jgedward95 


    Have you stuck it in top count as 

    int(items('Apply_to_each_3')?['EmailCount']) 

    rather than in a compose. 

     

    Damien

  • Verified answer
    Pstork1 Profile Picture
    67,129 Most Valuable Professional on 02 Mar 2021 at 19:41:39
    Re: Set Integer Variable

    Type the following into the Expressions tab of the content dialog when setting the variable.

    int(items('Apply_to_each_3')?['EmailCount'])

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2