Hello,
I am creating an app for ordering supplies. To order an article i can scan the barcode from the product in the warehouse so i can add it to an order list. The column "artikelcode" is a unique ID for each different article and is set to scannable.
If i scan the article it autofills all the related field (supplier, order quantity,...) trought the any(Select()) function
The column "artikel" displays the name of the article connected to this "artikelcode". "Artikel" is set to REF and an initial formula any(SELECT(Artikellijst[Artikel],[_THISROW].[artikelcode]=[artikelcode])) to search for the "artikel" linked to "artikelcode".
The other related columns (no REFS) have an initial value bases on the article code with any(SELECT()) based on the "artikelcode".
But i would like to have the option to add an article based on the "artikel" instead of artikelcode. I want to select the field for "article" where it shows a list of all the items (this is working) and when selecting the item it autofills the field "artikelcode".
If i add an initial value to "artikelcode" based on "artikel" (any(SELECT(Artikellijst[Artikelcode],[_THISROW].[artikel]=[artikel]))) it creates a circular definition because "artikel" is already based on any(SELECT(Artikellijst[Artikel],[_THISROW].[artikelcode]=[artikelcode])).
Thanks!
At first sight:
A single Ref column should give you the ability to either scan a code into it, or to manually select an article. Make sure to set the article name as the Label in the referenced table. And definitely follow Oscar's recommendation to use a dereference instead of your ANY(SELECT()) expressions.
https://help.appsheet.com/en/articles/961466-row-labels
https://help.appsheet.com/en/articles/961426-references-between-tables
I have set the column article code ("artikelcode") in the order list to REF to the article list. In the article list the article name ("Artikel") is set to label and the article code to key.
When i click in the form on the article code it shows a list of the article names, but now i am not able to scan the article code.
Order table:
Article table:
when clicking the barcode scanner:
when clicking the "artikelcode" field
You can only scan from mobile devices. Clicking that button in the emulator fills the field with "111222333".
When using mobile it opens the scanner trough the camera and scans, but when the scan is finished nothing appears in the scanned field.
Hmm. It works fine on my end. It's not a complicated setup. Just to be clear, the scanned value should be the Key value from the referenced table, not the Label.
Did you remove all of the valid_if and/or initial value stuff that you were using before? Maybe some of your old setup is interfering with it.
The scanned value articlecode (artikelcode) is set as key in the article list. The according name (artikelnaam) is set as label.
in the order list article code is set to ref and scannable.
When I try to scan the barcode for and article it does not match anything. I can select the article manually by clicking the field and selecting from the list of article names.
User | Count |
---|---|
41 | |
25 | |
25 | |
17 | |
12 |