LoginSignup
2
2

More than 1 year has passed since last update.

数式の整理

Last updated at Posted at 2021-05-12

Answersで回答する時に使う情報のまとめに戻る

Answersで多い質問のひとつに数式があります。数式は使う場所で微妙に制約が変わってきます。
そこを整理しておきます。(回答する時に忘れてしまいます。考える暇はありません、回答上位者はみんな数式の回答が早い。秒殺です。)
内容が重複していたていましたので、整理しています 2022/09/28

Validation Rule Formulas only use ID-15, not the full ID-18

日本語環境でなんだっけ、面倒なのでこのままでいいや。

Validation RuleでIdを使う場合は15桁とのこと。
まぁ、そもそもIdをべた書きするなってことみたいです。

Help with Validation Rule

しかし、PBでは18桁のようです。
ユーザーは、15文字のIDではなく18文字のIDを使用する必要があります。

Process does not trigger when filter uses an 'ID' field

Convert a 15-character Id to an 18-character Id

整理してみました

Idの桁数 Formula help using record type id
Formula Fields: ID-15
Validation Rules: ID-15
Workflow Rules: ID-15
Approval Processes: ID-15
Process Builder: ID-18
Flow Builder: ID-18 フローでIdをセットすると18桁、数式では15桁なので変換が必要 CASESAFEID
Row-Level Report Formulas: ???
Web to Lead ID-15

数式フィールドでコロン「:」はどういう意味ですか?

複雑なIF条件式は見直すことが可能です。

I assume this is just for a formula checkbox field? There's really no point in specifying the false conditions, just look for when it's true, and the rest will be false:

偽の条件を指定しても意味がありません。真の場合を探すだけで、残りは偽になります。

確かにその通り。

Receiving Compile Error on formula - must be some way to condense this?

IFとCASEの合わせ技

ORを簡単に書ける技みたいですね。最初からは思いつかん。

IF(CASE(Owner.UserRole.Name, "Renewal Manager",1,"Customer Success",1,"Director, Sales Operations",1,0)=1,Owner.UserRole.Name,NULL)

バリデーションルールでは値を変更できません。

まぁあたりまえなんですが、案外質問されます。

Validation rule based on User Title

この回答は使えます。

The problem is that when you create a record, you cannot assign an owner (at least not in standard record pages).
問題は、レコードを作成するときに、所有者を割り当てることができないことです(少なくとも標準のレコードページでは)

選択リストが選択されているかのチェック

ISBLANK(TEXT( 選択リストフィールド ))

image.png

数式の時のダブルコーテーション

何故か最近ちょくちょくあります。

見た感じあっているんだけど、エラーになる。
ああ、ダブルコーテションが違う。

CASE ([Account].D_Pre_Exception__c,
“Q – 3 Days”, Today()+3, 
“Q – 1 Week”, Today()+7,
“Q – 2 Weeks”,Today()+14,
“Q – 3 Weeks”, Today()+21,
NULL)

どうもMS Wordのコピペはだめらしい。

Hi All,

その他

2
2
0

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
2
2