Filling a field depending on the (scanned) value in another

Hi everyone,
I need a bit of help with the ux of my inventory app.
On a mobile device, the user can scan a barcode for the product code (MPC; Mfg Product Code) and based on the value the fields group_(MGC; Model Group Code)_ and Description should be filled from a table Hardware with columns MPC, Description and MGC.


The MPC is the key as it is unique.
My Problem; when the user scans (or types) the MPC, How do I populate the other 2 fields with the correct information as this is at this time only in the app (later it will be committed to an Excel list along with other information)?
Of all the variations I have tried, the closest only gives me the first line in the Hardware table.

Any ideas, suggestions or help is greatly appreciated.

Solved Solved
0 2 630
1 ACCEPTED SOLUTION

Hi @Lynn,
Thanks for the quick reply.
The “Stock Management App” is the basis for my app but it doesn’t take the Barcode of the product and populate the other fields either.
Maybe I should explain a bit more for clarity; The user scans the MPC of a device and dependent on this value it should fill the other 2 fields (eg. MGC = “Notebook” and Description = “HP EliteBook 850 G5”). After a few other bits of information are collected on the mobile the user can select “Save” and commit all of the information to the data sheet.
Does that help any?
The expression that “almost” worked was something with SELECT(). I’ve change it trying to solve my problem so I don’t know exactly what I had in there. Sorry.

I guess the main problem is “how do I access field values that are only present in the mobile app part of the program?”

I have just realized that the expression neither in the Slice nor in the Data Bable function. There appears to be a basic mistake in my expression.
At the moment I am using a Slice and trying SELECT(HWInfo[MGC]; HWInfo[MPC] = [_THISROW].[MPC]; TRUE) but keep getting the error Cannot compare List with Text in (HWINFO[MPC] = [ID].[MPC]).
I don’t understand why is is choosing the [ID] field and not the [MPC] field.

UPDATE
Thanks to the new YT Video posted today (https://www.youtube.com/watch?v=jSkXMtsj1dM) I was able to find a solution for this problem. Apparently I wasn’t using the Reference data type properly.

Thanks anyway to whoever looked at my question and wanted to help.

View solution in original post

2 REPLIES 2

Hi @Charles , What was the formula that you tried that didnt quite work? Did you check out the sample “Stock Managment App” ?
https://www.appsheet.com/samples/This-inventory-app-uses-barcode-scanner-to-record-stock-in-and-stoc...

Hi @Lynn,
Thanks for the quick reply.
The “Stock Management App” is the basis for my app but it doesn’t take the Barcode of the product and populate the other fields either.
Maybe I should explain a bit more for clarity; The user scans the MPC of a device and dependent on this value it should fill the other 2 fields (eg. MGC = “Notebook” and Description = “HP EliteBook 850 G5”). After a few other bits of information are collected on the mobile the user can select “Save” and commit all of the information to the data sheet.
Does that help any?
The expression that “almost” worked was something with SELECT(). I’ve change it trying to solve my problem so I don’t know exactly what I had in there. Sorry.

I guess the main problem is “how do I access field values that are only present in the mobile app part of the program?”

I have just realized that the expression neither in the Slice nor in the Data Bable function. There appears to be a basic mistake in my expression.
At the moment I am using a Slice and trying SELECT(HWInfo[MGC]; HWInfo[MPC] = [_THISROW].[MPC]; TRUE) but keep getting the error Cannot compare List with Text in (HWINFO[MPC] = [ID].[MPC]).
I don’t understand why is is choosing the [ID] field and not the [MPC] field.

UPDATE
Thanks to the new YT Video posted today (https://www.youtube.com/watch?v=jSkXMtsj1dM) I was able to find a solution for this problem. Apparently I wasn’t using the Reference data type properly.

Thanks anyway to whoever looked at my question and wanted to help.

Top Labels in this Space