cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate II
Advocate II

InputText bind with Barcode scanner, Reset InputText not working

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

1 ACCEPTED SOLUTION

Accepted Solutions

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 Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Community Support
Community Support

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

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

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

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

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

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 Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

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.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,887)