在Flow中使用formula,来实现金额字符串的逗号分隔显示
1。首先创建一个数式的资源
2。其次写入数式的内容
代码如下
IF({!$Record.TradingValueIncludingTax__c} < 1000,
TEXT({!$Record.TradingValueIncludingTax__c}),
IF({!$Record.TradingValueIncludingTax__c} < 1000000,
TEXT(FLOOR({!$Record.TradingValueIncludingTax__c} /1000)) & ',' & RIGHT(TEXT({!$Record.TradingValueIncludingTax__c}), LEN(TEXT({!$Record.TradingValueIncludingTax__c})) - LEN(TEXT(FLOOR({!$Record.TradingValueIncludingTax__c} /1000)))),
IF({!$Record.TradingValueIncludingTax__c} < 1000000000,
TEXT(FLOOR({!$Record.TradingValueIncludingTax__c} /1000000)) & ',' & MID(TEXT({!$Record.TradingValueIncludingTax__c}), 1 + LEN(TEXT(1 + FLOOR({!$Record.TradingValueIncludingTax__c} /1000000))),3) & ',' & RIGHT(TEXT({!$Record.TradingValueIncludingTax__c}), LEN(TEXT({!$Record.TradingValueIncludingTax__c})) - LEN(TEXT(FLOOR({!$Record.TradingValueIncludingTax__c} /1000)))),
IF({!$Record.TradingValueIncludingTax__c} >= 1000000000,
"#.TooHigh!", NULL))))
最后,更新到Text的字段里面就可以了