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 / Keeping text field on ...
Power Apps
Answered

Keeping text field on edit

(0) ShareShare
ReportReport
Posted on by 2

I have a canvas app that I have created from a SP list.  The idea of this list is used to track IT property.

 

Currently I have a scan button for the Porperty Number field (Singleline) 

 

Scan button  "OnScan"

Set(varScan,PropertyScan.Value)

 

Text Field for the button

If(varScan = "",varScan,Parent.Default)

 

I have tried - If(varScan = "",Parent.Default,varScan) - in which case it will retain but not allow you to scan and overwrite.

 

The Code that I have works great and allows the button to scan the barcode and prefill the text area, however on following edits the "asset" the fields are then blank.  How do I modify the code on the text field to retain the previous information unless it is cleared?  I am sure that this is a simple fix, I just can't seem to formulate the right question to find the right answer.

 

Thank you,

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @LandinB 

    I am assuming this is in a Form.

    If so, then your Default property on your TextInput control should be:  

       Coalesce(varScan, Parent.Default) 

     

    Also, if you are not seeing the value expected, then check your Default property on the datacard and make sure it is referencing the correct datafield.  i.e. ThisItem.yourColmumNameHere

     

    I hope this is helpful for you.

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard