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 / Can't change input var...
Power Automate
Unanswered

Can't change input variable data type.

(0) ShareShare
ReportReport
Posted on by

I am not able to change the input variable data type to anything other than string. I want to simply use a variable PaletteCount to use as the End To value for a loop, but I can't because it is a string value. I tested this multiple times but it will not work with a string despite the only answer given to another person with a nearly identical issue. Right now this is what I have:

Problem.PNG

I cannot change the Data type box, left clicking does nothing, right-clicking has things faded out, and I can't think of any other way of changing this. If there is a way to change this variable to an integer either in the variable's initialization itself or with an action or a function somewhere in my flow, it would allow me to continue with what I'm doing. Thanks for any help you can give!

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    After this, use the "Convert text to number" action.

     

    Good luck!

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Or if it doesn't need to be an input variable, you can just use the "Set Variable" action and supply it the number

  • VJR Profile Picture
    7,635 on at

    Yeah its strange that it doesn't work directly within a loop without any explicit (Convert Text to Number) or implicit (Set variable) conversion.

    In below example Set variable is doing the numeric conversion.

     

    VJR_0-1649474990291.png

     

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard