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 Apps / Text() Function not Wo...
Power Apps
Answered

Text() Function not Working as Expected

(0) ShareShare
ReportReport
Posted on by 2,329 Super User 2026 Season 1
I've been developing Power Apps long enough to know what the expected output of this should be, and it's not that:

 
I need to pad the value of this input box out to 12 digits with leading zeros but the output is a numeric value, as this snip from the monitor demonstrates:

Green text with no quotes in the JSON is certainly not text. I even defined it as such in my custom connector set up:


Can Power Apps be a little less buggy for me just this once, pretty please 🙏?
I have the same question (0)
  • Verified answer
    DP_Prabh Profile Picture
    354 on at
    Just making a guess please try this: 
    "" & Text(Value(Self.Value), "000000000000")
    adding empty string will lock it as string, i guess and pad the value with leading zeroes and then value from JSON.
    I have tested it by creating a collection and on text box used this formula
    and output is like 
     
    I hope this works for you!
  • Verified answer
    11manish Profile Picture
    2,207 on at
    The issue is not your padding logic—it’s that Microsoft Power Apps converts the value back to a number when sending it to the connector.
     
    Best Fix (Use this)
     
    Force the value to stay as text:
    "" & Text(Self.Value, "000000000000")
     
    Why this works
    • Text() formats the number 
    • "" & forces string type during API serialization 
    • Prevents Power Apps from converting it back to a number 
    Recommended usage

    Set(
       varParentWorkOrderId,
       "" & Text(Self.Value, "000000000000")
    );
    Then pass varParentWorkOrderId to your connector.
  • WillPage Profile Picture
    2,329 Super User 2026 Season 1 on at
    Thanks @11manish and @DP_Prabh - concatenating with an empty string is a suitable workaround to force the output as text. I've been developing Power Apps professionally for about 8 years and I've never had the Text() function simply ignore what I'm trying to do before, but thankfully this workaround is successful.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,009

#2
11manish Profile Picture

11manish 672

#3
Valantis Profile Picture

Valantis 628

Last 30 days Overall leaderboard