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 / InputText bind with Ba...
Power Apps
Answered

InputText bind with Barcode scanner, Reset InputText not working

(0) ShareShare
ReportReport
Posted on by

I have a form include a inputText, and InputText.Default=Barcodescan.Text, have a button to add InputText to Sharepoint list, this works fine, but want user click button, after data save to sharepoint, reset inputText to blank, cannot seems to get that work. And also want to know if PowerApps has default beep sound or have to add audio media to get beep sound, can we add beep sound after barcode scan success? Anyone have idea how to do that? Much appreciate any suggestion. Thanks Tom

Categories:
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Tomguan,

     

    Which function are you using to save Barcode.Text?

     

    I test this issue with Patch function. Set the Button’s OnSelect property as:

    Patch(Employee,Defaults(Employee),{Title:TextInput1.Text});UpdateContext({reset:true})

     

    Then set the Reset property of the Text input control as: reset.

     

    When you click the Patch button, it will patch the value to data source, then reset the Text input to blank.

     

    About the beep sound for Barcode scanner, I have seen an idea at PowerApps Ideas Forum, please vote and comment the idea at here:
    https://powerusers.microsoft.com/t5/PowerApps-Ideas/Barcode-Scanning/idi-p/8235

     

     

    Best regards,
    Mabel Mao

  • tomguan Profile Picture
    on at

    Thanks Mabel, that works, I used collect to save to sharepoint, and UpdateContext({reset:true}) solved my issue.

  • tomguan Profile Picture
    on at

    Hi Mabel,

     

    Tested more and found seems only works on first time if I typed in some text in text input, but won't reset after on 2nd time, or first time use scanner, also won't reset text input. Am I missing anything?

     

    Here is some detail.

    From my form, I have a barcode scanner and 1 textinput and 1 button. 

     

    textinput.default=barcodescanner.text

    textinput.Reset=reset

     

    button.onselect=collect(sharepointlist,{column01:textinput.text,column02:2});updatecontext({reset:true})

     

    Will try Patch function and test more and update result.

     

    Thanks

    Tom

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi tomguan,

     

    Please try to set the button’s OnSelect property as:

    Collect(sharepointlist,{column01:TextInput1.Text,column02:2});UpdateContext({reset:true});UpdateContext({reset:false})

     

    This function works for both Collect and Patch.

     

    As when we using the previous function, we make the reset property of the TextInput control always to be True. While we also need to reset it to False.

     

    Hope it could be a reference for you.

     

     

    Best regards,
    Mabel Mao

     

  • tomguan Profile Picture
    on at

    Hi Mabel,

     

    Thanks for your reply. The code works if I manually type in text in textinput, but if I use barcode scan, it won't reset textinput, I set textinput.default=barcodescan.text, I guess that's because barcode scan has not been reset, and barcode scanner does not have reset property. 

     

    And under following situation also works:

    1. Scan barcode, click add button, information saved to sharepoint, but textinput still has scanned value

    2. Manual type in information in textinput, click add button, save to sharepoint list and reset textinput

     

    Seems barcode scan won't get reset, but I could not find other way to get barcode scan information to textinput. Any idea.

     

    Thanks again for your help

     

    Tom

  • Verified answer
    v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi tomguan,

     

    Sorry for late response. I test the function again with Barcode scan, I found that when it comes to barcode scan, the function doesn’t work as expected, the barcode scan cannot be reset.

     

    As you mentioned, there is no reset property for barcode scanner, please consider to create an idea at PowerApps Ideas forum, PGs will check this forum and take your idea into consideration in the future releases.
    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

     

     

    Best regards,
    Mabel Mao

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Ok my solution to solve this is to use onHidden function on my screen,
    then i wright this as a function:
    barcode.text = ""

    Its working for me because after scanning i always switch screen.

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 Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard