自动跨表在AppSheet中查找

huangapple go评论90阅读模式
英文:

Automatic Lookup Across Tables in AppSheet

问题

你好,我在使用AppSheet时遇到了一个查找另一个表中数据的问题。基本上,当我扫描条形码时,我希望产品名称能够查找,就像在SQL中一样:

SELECT productName
FROM productLookupTable
WHERE productLookupTable.barcode == the_scanned_barcode

然而,在AppSheet中我似乎无法做到这一点。我尝试了以下公式作为添加视图中产品名称字段的公式,但也没有奏效:

LOOKUP([barcode],'productLookupTable','barcode','productName')

扫描条形码既不触发查找,也显示未找到匹配项(这是我尝试的多种组合中的两种不同情况)。

如果能提供任何帮助,我将不胜感激。

英文:

Hi I'm having a problem with looking up data on another table with AppSheet
Basically, when I scan in a barcode, I want the product name to lookup such that in SQL

SELECT productName
FROM productLookupTable
WHERE productLookupTable.barcode == the_scanned_barcode

However, I can't seem to do this in appsheet. I tried

LOOKUP([barcode],'productLookupTable','barcode','productName')

as the formula for the product name field in the add view and that didn't work either. Scanning a barcode didn't trigger a lookup, or it says match not found. (Two different scenarios of many combinations of things I tried.)

Any help would be appreciated.

答案1

得分: 0

你试过使用双引号而不是单引号吗?

LOOKUP([barcode],"productLookupTable","barcode","productName")

我认为你应该将[barcode]和[barcode]从productLookupTable表更改为文本类型。

英文:

Have you tried to use double quote insted of single quote?

LOOKUP([barcode],"productLookupTable","barcode","productName")

I think you should change the type of [barcode] and [barcode] from productLookupTable table to Text.

答案2

得分: 0

我差不多到那里了。我必须使用

LOOKUP([_Thisrow].[barcode],'productLookupTable','barcode','productName')

关键部分是

[_Thisrow]

然后它完美地运行了。

英文:

I was almost there. I had to use

LOOKUP([_Thisrow].[barcode],'productLookupTable','barcode','productName')

the key part is

[_Thisrow]

Then it worked perfectly.

huangapple
  • 本文由 发表于 2023年2月19日 20:54:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/75500285.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定