Hi Everyone,
I am trying to create an inventory management tool.. same old problem that I know so many people on here have posted messages about, but I think my problem is a little different.
I've set up a very basic Power App so far from a sharepoint list. There are 3 screens; which were primarily automatically created from the sharepoint list, when I clicked "Integrate, Power Apps, Create an App".
I have since created a Barcode Scanner, which identifies a serial number from a unique QR code, which would be attached to each item in the inventory, returning a 6 digit code. I believe these would be in a text format, but this could be changed to a numerical format using the value (" ") function.
Below is a screenshot of two of the screens. On the LHS, when the scan button is pressed, if the serial number returned from the barcode scanner, matches the serial number for the item of equipment in the inventory (stored in a connected Sharepoint list), then I want the user to get taken to the next screen, e.g. the RHS image.
So far I have been trying with a few if rules with the OnScan feature;
- If(Value("BarcodeScanner_S1.Value")=Value("ThisItem.'Serial Number'"),Select(Parent),Set(varShowPopup,true))
If("BarcodeScanner_S1.Value"="ThisItem.'Serial Number'",Select(Parent),Set(varShowPopup,true))
I believe the Select(Parent) function, will take me through to the second screen on the RHS depicted in the image above. The Set(varShowPopup,true) is just to display a popup if the QR code / serial does not match, however this is a step ahead of where I am currently.
Neither of these work well at the moment though. And I think this whole approach is wrong. As I have tried created an additioanl if/logical test which creates a "1" or "0" in a text box, to assess what is going on. Below is a screenshot of this. But basically I get a 1 (true) appearing in every single row of data, even when I can see the scanned value & equipment serial number don't match up. Also you can see a 1 is automatically assigned to all gallery line items..
(For clarity the numbers 54710 & 21311 are the numbers returned from the barcodescanner_S1.value. These were inserted as a visual check / confirmation for myself that the barcode scanner was functioning).
Very keen to hear back thoughts from anyone on how to get around this. Initially I am looking to ensure that the second screen can only be accessed it a QR code (attached to an item of equipment) is scanned. Once I have achieved this, I will then be looking to set the Power App to automatically update a sepcific data set / column in "SharePoint List", e.g. the "Last Inspected by" Column for the item of equipment that has just been scanned. But I am happy to start figuring out how to solve this problem afterwards
But I thought I would just mention it here, in case anyone thinks that I am going about this in the wrong approach, and that an alternative method may be more suitable.
Finally, for the sake of interest, I have foudn the following code works ok..., but is still not what I want to achieve.
Set(varScan, BarcodeScanner_S1.Value);
If(Not(IsBlank(LookUp('Vessel Inventory Inspection Summary','Serial Number'=Value(varScan)))),Select(Parent),Set(varShowPopup,true))
This grants access to the next page if any valid barcode / QR code is scanned. However the QR code does not have to be specific to the item it grants permission to. which is ultimately a bit of a failure in the system.
Thanks for all assistance in advance


Report
All responses (
Answers (