Forum Discussion
Md. Shamim Reza
Jan 30, 2022Copper Contributor
InvalidTemplate. The template language function 'sub' expects its first parameter to be an integer..
InvalidTemplate. Unable to process template language expressions in action 'Compose_6' inputs at line '0' and column '0': 'The template language function 'sub' expects its first parameter to be an integer or a decimal number. The provided value is of type 'Array'. Please see https://aka.ms/logicexpressions#sub for usage details.'.
I have used the below expression in my flow.
When I run this flow I am getting an error listed below:
I have used the below expressions:
sub(outputs('Compose_5'),outputs('Compose_3'))
sub(int(outputs('Compose_5')),int(outputs('Compose_3')))
sub(outputs('Compose_5'),'Compose_3')
sub(outputs('Compose_5'),2)
sub(int(outputs('Compose_5')),outputs('Compose_3'))
sub(outputs('Compose_5'),int(outputs('Compose_3')))
sub(int('Compose_5'),outputs('Compose_3'))
sub(outputs('Compose_5'),int('Compose_3'))
sub(18,outputs('Compose_3')) [only this expression working but this is not suitable for me]
What is the right expression for me on the Compose 6?
Thanks
Shamim
- sx5349Copper Contributor
could you pls help me to find the error in it?
{"inputs": {"content": "@triggerBody()?['data']?['alertContext']?['condition']?['allOf']","schema": [{"childErrors": [],"errorType": "type","lineNumber": 0,"linePosition": 0,"message": "Invalid type. Expected Object but got Array.","path": "","schemaId": "#"}]}}