Hello,
I am looking for a solution to my app for ordering. So far I use (among other functions) 3 tables to record orders.
Products (all articles saved)
Orders (all orders)
Order Summary (All items from the orders)
Unfortunately, at the moment I can only add articles to the orders by scanning the EAN/barcode.
The rest of the entries (price, name, article number etc.) are taken from the products by Lookup Thisrow.
My wish would be that if I don’t have a barcode available, I can still add the item by name & item number.
If I don’t scan the EAN field and tap on it, I get the list with the EANs. It would be cool if the name and article number were also at the end and I could also search for them. Of course, only the barcode should be inserted in EAN.
So far, I have tried to create a virtual column in Products to merge these two designations & mark these as “Label”.
In the Ordersummery I have set the EAN Scan entry as “Ref” (point to products)
nd tried to show the generated name next to the barcode.
I get yellow triangles next to the barcode.
How could I add items without affecting my basic function (scanning to capture).
Only if no barcode is available should I be able to search by name and or number and fill the fields again based on that.
Do you understand what I mean?
Asked my GPT of choice. I did not get a chance to test it, but maybe it helps:
Refining the Products Table:
Ensure your Products table has columns for EAN/Barcode, Name, Item Number, Price, etc.
Create a Virtual Column in the Products table, named something like DisplayName, which concatenates the Name, Item Number, and EAN. Use an expression like:
In your Orders table, you have a column for EAN Scan (which is a Ref to the Products table).
Update this column’s ‘Valid If’ expression to reference the new DisplayName Virtual Column. This allows users to see and search by the combined name and item number, as well as EAN. The expression would be something like:
SELECT(Products[DisplayName], TRUE)
Handling the Selection:
When a user selects an item from this dropdown, you want only the EAN/Barcode to be inserted in the EAN field of the Orders table.
To achieve this, use a ‘Suggested Values’ expression in the EAN Scan column like this:
This expression looks for the EAN where the DisplayName matches the selected value and suggests only the EAN.
Autofilling Other Details:
For other fields like Price, Name, etc., use AppSheet’s de-referencing capability to autofill these based on the EAN reference. For example, in the Orders table, the expression for the Price column could be:
[EAN Scan].[Price]
Handling the Yellow Triangles (Warning Icons):
These usually indicate some kind of mismatch or error in references or expressions. Review your column settings, especially the ‘Valid If’, ‘App formula’, and ‘Suggested Values’ expressions to ensure they are correctly set up.
I’ve just been working for hours on realizing my idea. But still without success…
I tryed multiple ways..
A strange problem has arisen:
I have already created in Products: DisplayName with Concanate.
I have now created another column in my order summary → (ProductSelection)
This has the suggested value: SELECT(Products[DisplayName], TRUE)
In the PC version, i.e. in the editor, I can select the entry and the entries are displayed as desired.
On the smartphone it shows me the column, but when I want to select, the list is completely empty.
How does that happen? App and editor are updated…
Maybe I could use this method to fill the values… But unfortunately no entries in ProductSelection.