在查找表中带有星号的PowerApps查找

发布于 2025-01-30 18:47:48 字数 350 浏览 1 评论 0原文

我正在按照客户端的请求重建PowerApp中的访问数据库。原始数据库使用查找函数返回记录,但是表的“查找列”中的某些值在字符串的末端使用星号,允许该记录返回,如果我们正在搜索字符串以相同的相同的启动开始人物。例如,如果查找列说“ stac*”,则搜索以“ stac”开头的任何东西都会返回该记录,包括“堆栈”,“堆叠”,“ stacy的妈妈”和“ stackoverflow”。我正在尝试在PowerApps中重现这一动作,但是我对如何实现这一目标感到沮丧。

一个同事建议将每个可能的解决方案包括在字符串中使用星号的每个记录。查找表非常长,完全包含所有可能的查找值,消除对星号的需求将呈指​​数成倍增加表的长度,并且在更新表更新时每季度创建一次非常耗时,更不用说每季度了。

I'm rebuilding an Access database in PowerApps at the client's request. The original database uses a lookup function to return records, but some of the values in the lookup column of the table use an asterisk at the end of the string, allowing that record to return if the string we're searching for starts with those same characters. For example, if the lookup column says "stac*", then searching for anything that starts with "stac" will return that record including "stack", "stacking", "stacy's mom", and "stackoverflow". I'm trying to reproduce this action in PowerApps, but I'm at a loss on how to accomplish this.

A coworker suggested including every possible solution for each of the records that use an asterisk in the string. The lookup table is very long and fully including every possible lookup value, removing the need for the asterisk would multiply the length of the table exponentially and would be very time consuming to create once, much less quarterly when the table is updated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久光 2025-02-06 18:47:48

Power应用程序中查找功能的第二个参数可以使用任何Power FX功能。就您而言,您可以使用 startswith函数,类似于下面的示例:

LookUp(<data source>, StartsWith(<column>, "stac"))

或者某些查找值具有星号,而其他查找值则可以使用

If(
  EndsWith(lookUpValue, "*"),
  LookUp(<data source>, StartsWith(<column>, Left(lookUpValue, Len(lookUpValue) - 1))),
  LookUp(<data source>, <column> = lookUpValue))

The second parameter to the LookUp function in Power Apps can use any Power Fx function. In your case, you can use something like the StartsWith function, similar to the example below:

LookUp(<data source>, StartsWith(<column>, "stac"))

Or if some lookup values have asterisks and others don't, you can use something along the lines of

If(
  EndsWith(lookUpValue, "*"),
  LookUp(<data source>, StartsWith(<column>, Left(lookUpValue, Len(lookUpValue) - 1))),
  LookUp(<data source>, <column> = lookUpValue))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文