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 / Set value of TextBox (...
Power Apps
Answered

Set value of TextBox (in gallery) on button click

(0) ShareShare
ReportReport
Posted on by 13

I have a Gallery with Items.
Each Item has a Textbox associated with it.
Users can modify the values in the Textbox and submit them.

After they click submit, I wish to (re)set the values in the Textbox to some default value x.

 

How can I do that? What is the command to set 'Textbox.Value' to 'x'?

Categories:
I have the same question (0)
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @PDiracDelta 

     

    Set the Default Property of TextBox to Blank() or ""

     

  • PDiracDelta Profile Picture
    13 on at

    Thanks for responding. Two issues here:

    1. I wish to set the property automatically by clicking on a button, not by actually setting a value in the interface.

    2. TextBox has no Default property, only a Placeholder property. From what I learned, the Reset function exists but it only applies to objects with a Default property.

  • Verified answer
    PDiracDelta Profile Picture
    13 on at

    I have found a workaround (for default value x and Gallery definition GALLERY_DEFINITION😞

    1. On the App screen, do: OnStart=Set(ValueResetter, false);
    2. On the Submit button, do: OnSelect=Set(ValueResetter, true); Set(ValueResetter, false);
    3. On the Gallery, do: Items=If(Not ValueResetter, GALLERY_DEFINITION)
    4. On the TextBox, do: Value=If(ValueResetter, x, x)

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard