如何在 LOGIC APPS 中截断字符串?

How to Truncate a STRING in LOGICAPPS?

我们有一些地址超过 30 个字符,我必须将它们截断为最多 30 个字符。我想做的是:

"value": "@{substring(body('Parse_JSON_2')?['address1'],0,29)}"

我得到的错误是:

Unable to process template language expressions in action 'Set_variable' inputs at line '1' and column '2956': 'The template language function 'substring' parameters are out of range: 'start index' and 'length' must be non-negative integers and their sum must be no larger than the length of the string

尝试使用:

@{substring(string(body('Parse_JSON_2')?['address1'],0,29))}