cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Witham
Level: Powered On

Collection Value Missing

Hi

I am struggling to understand why something is happening as it seems to make no sense. I have a stocktaking powerapp that has a scan button that uploads QR Code data into a collection. The collection also has a textbox that allows the user to manually input a quantity, the default value of this input box is blank.

When I test the app and press the scan button and add values it all works fine except for the last quantity value which appears blank in the collection.

Any help would be great please.

1 ACCEPTED SOLUTION

Accepted Solutions
Witham
Level: Powered On

Re: Collection Value Missing

Finally figured out a workround where the user now inputs the quantity forst and then scans the barcode, this ensures the value is input before the scan button is pressed and so it now works fine.

4 REPLIES 4
Community Support Team
Community Support Team

Re: Collection Value Missing

Hi @Witham ,

Could you please share a screenshot about the issue within your app?

How do you upload your QR code data and quantity data into your Collection? Could you please share a bit more about the formula?

 

I have made a test on my side, and don't have the issue that you mentioned. Please take a try with the following formula to save QR code data and quantity data into your Collection:

Patch(
          CollectionName,
          Defaults(CollectionName),
          {
              Barcode: BarcodeScanner1.Value,
              Quantity: TextInput1.Text
          }
)

Note: The Barcode and Quantity are both columns in your Collection.

More details about the Patch function, please check the following article:

Patch function

 

If the issue still exists, please consider take a try to re-create your app, then try above formula I provided, check if the issue is solved.

Please make sure that you have typed a proper Quantity value within the Text Input box.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Witham
Level: Powered On

Re: Collection Value Missing

Hi

Thanks for the reply, I have attatched a word document showing the funtion for the location comple button.

The two screen shots are the entered qty in the app and the view of the collection which as you can see omits the last qty record for some reason.

The "false" button was purely to determine if the app thought the last value was blank to try an debug.

Witham
Level: Powered On

Re: Collection Value Missing

Hi

After alot of trial and error (alot of error) I think I know why it's happening.

The stocktaking screen has a button that brings the first record into the collectionthat uses:

Collect(manscanitem, {QRCode: BarcodeScanner2_1.Value, StockLocation: varSingleScan, QtyInput: Value(ManualQty.Text)})

Then the button is pressed again to bring the next record in but Powerapps has included in the collection the first record with a blank value before user has put a value in the manual textbox input.

Is there a way of stopping this happening??

Witham
Level: Powered On

Re: Collection Value Missing

Finally figured out a workround where the user now inputs the quantity forst and then scans the barcode, this ensures the value is input before the scan button is pressed and so it now works fine.