0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

面白い数式項目を作ってみた

Posted at

Salesfroceの数式項目で面白い項目を作成したので残します

項目その1
項目A、項目B、項目Cがあります(すべて選択リスト)
項目の選択リストで何個の項目が「YES」なのか計算する数式です
IF( AND( ISPICKVAL(test1__c, "YES"), ISPICKVAL(test2__c, "YES"), ISPICKVAL(test3__c, "YES")),3, IF( AND( ISPICKVAL(test1__c, "YES"), ISPICKVAL(test2__c, "YES"), ISPICKVAL(test3__c, "NO")),2, IF( AND( ISPICKVAL(test1__c, "YES"), ISPICKVAL(test2__c, "NO"), ISPICKVAL(test3__c, "YES")),2, IF( AND( ISPICKVAL(test1__c, "NO"), ISPICKVAL(test2__c, "YES"), ISPICKVAL(test3__c, "YES")),2, IF( AND( ISPICKVAL(test1__c, "NO"), ISPICKVAL(test2__c, "NO"), ISPICKVAL(test3__c, "YES")),1, IF( AND( ISPICKVAL(test1__c, "NO"), ISPICKVAL(test2__c, "YES"), ISPICKVAL(test3__c, "NO")),1, IF( AND( ISPICKVAL(test1__c, "YES"), ISPICKVAL(test2__c, "NO"), ISPICKVAL(test3__c, "NO")),1,0)))))))

項目その2
項目A、項目B、項目Cがあります(すべてチェックボックス)
項目の選択リストで何個の項目が「チェック済み」なのか計算する数式です

IF( AND( test11__c = TRUE, test22__c = TRUE, test33__c = TRUE),3, IF( AND( test11__c = TRUE, test22__c = TRUE, test33__c = FALSE),2, IF( AND( test11__c = TRUE, test22__c = FALSE, test33__c = TRUE),2, IF( AND( test11__c = FALSE, test22__c = TRUE, test33__c = TRUE),2, IF( AND( test11__c = TRUE, test22__c = FALSE, test33__c = FALSE),1, IF( AND( test11__c = FALSE,test22__c = TRUE, test33__c = FALSE),1, IF( AND( test11__c = FALSE,test22__c = FALSE, test33__c = TRUE),1,0)))))))

0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?