LoginSignup
0
0

TIMEVALUEが機能しない バグ?

Posted at

image.png

この数式で変換できるはずなんですが、何故か空白になります。

CASE(RIGHT(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c )) ,2) ,
"AM", IF(LEN(SUBSTITUTE(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c ))," AM",""))=7,
TIMEVALUE("0"+SUBSTITUTE(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c ))," AM","")+ ".000"),
TIMEVALUE(SUBSTITUTE(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c ))," AM","")+ ".000")
),
"PM", IF(LEN(SUBSTITUTE(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c ))," PM","")) =7,
TIMEVALUE("0"+ SUBSTITUTE(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c ))," PM","") + ".000"),
TIMEVALUE(SUBSTITUTE(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c ))," PM","") + ".000") + 12*60* 60 * 1000
),
IF(LEN(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c )) ) =7,
TIMEVALUE("0" + RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c ))+ ".000"),
TIMEVALUE(RIGHT(  inputDateTime__c  ,LEN(inputDateTime__c) - FIND(' ', inputDateTime__c ))+ ".000")
)
)

別の数式に上記を設定して、数式でこれを呼び出すと機能します。

image.png

結局はバグみたいです。

れは Salesforce のバグのような気がします。時間式 TIMEVALUE('9:45:00.000') がある場合、正しい時刻 9:45 が得られます。しかし、テキスト '9:45:00.000' を生成するテキスト式があり、それを時間式で使用すると、突然機能 (リスト ビュー、レポート) が停止します。

This smells like a Salesforce bug: if I have a Time formula TIMEVALUE('9:45:00.000'), I get a proper time 9:45. But if I have a Text formula that produces a Text '9:45:00.000' and I use that in a Time formula, then all of a sudden things stop working (list view, report).

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