Skip to main content
Community site session details
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

  • Verified answer
    Pstork1 Profile Picture
    67,209 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'])

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!

Loading complete
Loading complete