web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Resetting / Clearing T...
Power Apps
Unanswered

Resetting / Clearing Text Input values from Barcode Scanner after submitting

(0) ShareShare
ReportReport
Posted on by

I have an inventory application that takes advantage of the Barcode Scanner.  I scan the Location Barcode tag and that value is input into a text input control and then I scan the SKU Barcode Tag and that value is input into another text input control.  Then I have label that looks up the Barcode and retrieves the actual SKU Number it is associated with.  There are two more inputs below all of this for Cases and Eaches.  

 

The cases input and eaches input clear their values upon pressing submit.

Reset(inputCases); Reset(inputEaches)

However: The below do not reset and the values stay after pressing submit.

Reset(barcodeSKU); Reset(barcodeLocation); Reset(inputSKU)

I even tried resetting their values through the Reset Property and using submitCountButton.Pressed but that did not work either.  

 

Any ideas?

 

All help is appreciated

 

**************************EDIT***************************

The issue I am having is with the values from the barcode scanner being reset after the submit button is pressed.  My other text inputs reset just fine, however the barcode scanner values do not.

 

 

 

 

 

Categories:
I have the same question (0)
  • prajyot Profile Picture
    132 on at

    Hello,
    Select the textbox which you want to reset the values. Now go to Advanced and set the 'Reset' property value to resetinputcase
    Now onselect of submitCountButton write the below code.

    UpdateContext({resetinputcase:true});UpdateContext({resetinputcase:false})

    Hope it helps.

    Thanks,
    Prajyot M.

  • Community Power Platform Member Profile Picture
    on at

    The values are still hanging in there.  

     

    I changed the reset property on the Text input Box for the barcode location scanner value to resetbarcodelocation.

     

    Then in my OnSelect for the button I did UpdateContext({resetbarcodelocation:true}).

     

    The value is still in the barcode location text box.  

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Anonymous ,

    Could you please share a bit more about your issue?

    Do you mean that the barcode scanned value (within Text Input box) from the Barcode control could not be reset (the Barcode Scanner control could not reset)?

    Further, have you set the Default property of the Text Input box (e.g. barcodeLocation, barcodeSKU) to the BarcodeScanner1.Value formula?

     

    Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side. The Reset() function could not reset the barcode scanned value (within Text Input box) from the Barcode control.

     

    I think this issue is related to the Default property of the Text Input box. If you set the Default proeprty of the Text Input box (e.g. barcodeLocation, barcodeSKU) to the BarcodeScanner1.Value formula, it would display the scanned barcode value as Default value within the Text Input box.

    The Reset function could only reset the Text Input box to default value rather than clear the value within the Text Input box. If the Barcode Scanner control is not reset, the Text Input box (e.g. barcodeLocation, barcodeSKU) would still display the scanned barcode value as the Default value within the Text Input box.

     

    As an alternative solution, please consider reset the Barcode Scanner control after submitting rather than Reset the Text Input boxes. I have made a test on my side, please take a try with the following workaround:

    Set the OnSelect property of the "Submit" button to following:

    ...;
    Reset(BarcodeScanner1); /* <-- Add this formula to reset your Barcode Scanner control */
    ...

     

    In addition, please also consider take a try with the following workaround:

    Set the OnScan property of the Barcode Scanner control to following:

    Set(IsReset, false)

    Set the Default property of the Text Input box to following:

    If(
     IsReset,
     Blank(),
     BarcodeScanner1.Value
    )

    Set the OnSelect property of the "Submit" button to following:

    ...;
    Set(IsReset, true); /* <-- Add this formula */
    ....

    Set the OnVisible property of the current screen to following:

    Set(IsReset, true);

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • prajyot Profile Picture
    132 on at

    You need to do UpdateContext({resetbarcodelocation:true}) & UpdateContext({resetbarcodelocation:false}), this will clear out the values from the input textbox

  • Community Power Platform Member Profile Picture
    on at

    I had the same problem as described and found a simple solution to reset the text input field. 

    Set the OnScan property of the "BarcodeScanner" button to:

    Set(varsingleScan1, BarcodeScannerEdit1.Value)

    Set the Default property of the "TextInput1" field to:

    varsingleScan1

     Set the OnSelect property of the "Reset" button to:

    Set(varsingleScan1, "");

     

  • SharanVs Profile Picture
    3 on at

    This worked for me

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard