可以使用indexOf函数查找表达式中某个值的实例。例如,在以下示例表达式中,我们希望查找'hello”字符串出现的实例:
if(contains(activity('MyActivity').output.result, 'hello'), 'found', 'not found')
我们可以使用以下代码来查找它:
indexOf(activity('MyActivity').output.result, 'hello')
示例:
if(contains(activity('Copy Data1').output.data, 'hello'), indexOf(activity('Copy Data1').output.data, 'hello'), 'not found')