我有一个filemaker数据库,我想根据以下标准显示记录:
显示所有者或用户所在的所有记录" John"这个地方是"伦敦","巴黎"或"阿姆斯特丹"
第一部分很简单:
Enter Find Mode [Pause:Off]
Set Field [mydb::Owner; "John"]
New Record/Request
Set Field [mydb::User"; "John"]
Perform Find[]
但是第二部分呢?到目前为止,我还没有实现这一点。我当然可以继续浏览找到的记录并省略我不想要的记录,但应该有更好的方法来做到这一点。
答案 0 :(得分:2)
有。执行初始查找后,可以使用Constrain Found Set。
Enter Find Mode [Pause:Off]
Set Field [mydb::Owner; "John"]
New Record/Request
Set Field [mydb::User"; "John"]
Perform Find[]
#Constrain the found set
Enter Find Mode [Pause:Off]
Set Field [mydb::Place; "London"]
New Record/Request
Set Field [mydb::Place; "Paris"]
New Record/Request
Set Field [mydb::Place; "Amsterdam"]
Constrain Found Set []
答案 1 :(得分:1)
创建FileMaker搜索的一种简单方法是在以下列表中重新定义搜索要求:
(O and L)
or
(O and P)
or
(O and A)
or
(U and L)
or
(U and P)
or
(U and A)
but not
(B and C)
换句话说:
在您的示例中,您可以写:
(Owner="John" and Place="London")
or
(Owner="John" and Place="Paris")
or
(Owner="John" and Place="Amsterdam")
or
(User="John" and Place="London")
or
(User="John" and Place="Paris")
or
(User="John" and Place="Amsterdam")
当你写下来时,你所要做的就是:
示例代码如下所示:
Enter Find Mode [Pause:Off]
Set Field [mydb::Owner ; "John"]
Set Field [mydb::Place ; "London"]
New Record/Request
Set Field [mydb::Owner ; "John"]
Set Field [mydb::Place ; "Paris"]
New Record/Request
Set Field [mydb::Owner ; "John"]
Set Field [mydb::Place ; "Amsterdam"]
New Record/Request
Set Field [mydb::User ; "John"]
Set Field [mydb::Place ; "London"]
New Record/Request
Set Field [mydb::User ; "John"]
Set Field [mydb::Place ; "Paris"]
New Record/Request
Set Field [mydb::User ; "John"]
Set Field [mydb::Place ; "Amsterdam"]
Perform Find[]
无论你使用这种多重请求方法还是AndreasT的约束方法,都是性能问题&你得到的组合数量。
为了完整起见,这里有一个例子,但不是' - 以英国脱欧为主题:
假设您想要在欧洲大陆找到FileMaker程序员,您可能有以下标准:
(Job="FileMaker" and Place="Europe")
but not
(Land="UK")
使用上述方法,这将实现为:
Enter Find Mode [Pause:Off]
Set Field [mydb::Job ; "FileMaker"]
Set Field [mydb::Place ; "Europe"]
New Record/Request
Omit Record
Set Field [mydb::Land ; "UK]
Perform Find[]
Happy FileMaking!
MrWatson