【问题标题】:Field formula with Case/If statement带 Case/If 语句的字段公式
【发布时间】:2021-01-22 02:30:35
【问题描述】:

我想通过检查两个选项列表字段 AB 为字段 C 设置公式(选项列表中的值将是, 没有, 没有)

 If field A = "Yes" and field B = "Yes"  then field C = "1"
 If field A = "Yes" and field B <> "Yes"  then field C = "2"
 If field A <> "Yes" and field B = "Yes"  then field C = "3"
 If field A <> "Yes" and field B <> "Yes"  then field C = "4"

我不知道如何为字段 C 设置公式以使其工作,我尝试 CASE、IF 语句没有任何运气。

任何帮助将不胜感激。

谢谢,

【问题讨论】:

    标签: salesforce salesforce-lightning


    【解决方案1】:

    我建议花一些时间在这些线索上:Use Formula FieldsAdvanced Formulas
    Formula Operators and Functions 文档页面添加为书签也会很有用。

    由于AB 是选项列表字段,您必须使用ISPICKVAL(field, value)
    如果C 是文本公式字段:

    IF( ISPICKVAL(A, 'Yes'),
        IF ( ISPICKVAL(B, 'Yes'),
            '1',
            '2'
        ),
        IF ( ISPICKVAL(B, 'Yes'),
            '3',
            '4'
        )
    )
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-10-03
      • 1970-01-01
      • 2016-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多