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,339 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
    381 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
    3,333 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,339 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard