【问题标题】:FileMaker global list fieldFileMaker 全局列表字段
【发布时间】:2017-05-05 05:28:43
【问题描述】:

我正在尝试通过在全局字段中添加和删除记录 ID 来创建多选功能。

我创建了一个名为 current_selection 的全局字段。

我在 name 字段中附加了一个脚本操作,假设将记录 id 添加或删除到全局字段。

If ( PatternCount ( committee::current_selection; committee::id & "¶"); Substitute ( committee::current_selection; committee::id &"¶"; "¶"); committee::id & "¶" &committee::current_selection)

这就是我设置全局字段的方式。

同时,我为名称字段设置条件格式,以便查看所选内容

PatternCount ( committee::current_selection; committee::id & ¶)

so what happens is 1 is selected when 11 is selected then if I click 1 it takes 1 off 11

不知道为什么会这样

【问题讨论】:

    标签: filemaker


    【解决方案1】:

    好吧,"1" 包含在 "11" 中,因此您的测试会产生误报。并用"11¶" 替换"1¶" 留下"1"

    要查看某个项目是否存在于返回分隔值列表中,请使用:

    IsEmpty ( FilterValues ( item ; listOfValues ) )
    

    从列表中删除一个项目比看起来要困难得多。开始:

    Substitute ( ¶ & listOfValues & ¶ ; ¶ & item & ¶ ; ¶ ) 
    

    然后从结果中删除多余的回车。

    【讨论】:

    • +1 迈克尔。我通常将值包含在 xml 之类的标签中,因此更容易匹配和删除:例如111
    猜你喜欢
    • 2014-10-20
    • 1970-01-01
    • 1970-01-01
    • 2012-03-11
    • 2020-09-05
    • 1970-01-01
    • 2018-10-12
    • 2015-01-28
    • 1970-01-01
    相关资源
    最近更新 更多