InvalidTemplate. The template language function 'sub' expects its first parameter to be an integer..

%3CLINGO-SUB%20id%3D%22lingo-sub-3088863%22%20slang%3D%22en-US%22%3EInvalidTemplate.%20The%20template%20language%20function%20'sub'%20expects%20its%20first%20parameter%20to%20be%20an%20integer..%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3088863%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EInvalidTemplate%3C%2FSTRONG%3E%3CSPAN%3E.%26nbsp%3BUnable%20to%20process%20template%20language%20expressions%20in%20action%20'Compose_6'%20inputs%20at%20line%20'0'%20and%20column%20'0'%3A%20'The%20template%20language%20function%20'sub'%20expects%20its%20first%20parameter%20to%20be%20an%20integer%20or%20a%20decimal%20number.%20The%20provided%20value%20is%20of%20type%20'Array'.%20Please%20see%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Flogicexpressions%23sub%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Flogicexpressions%23sub%3C%2FA%3E%20for%20usage%20details.'.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20have%20used%20the%20below%20expression%20in%20my%20flow.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MdShamimReza_1-1643549515472.png%22%20style%3D%22width%3A%20451px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343676i6F3C408175645166%2Fimage-dimensions%2F451x435%3Fv%3Dv2%22%20width%3D%22451%22%20height%3D%22435%22%20role%3D%22button%22%20title%3D%22MdShamimReza_1-1643549515472.png%22%20alt%3D%22MdShamimReza_1-1643549515472.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20run%20this%20flow%20I%20am%20getting%20an%20error%20listed%20below%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MdShamimReza_2-1643549666998.png%22%20style%3D%22width%3A%20455px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343677iFF9964D3E30D144D%2Fimage-dimensions%2F455x330%3Fv%3Dv2%22%20width%3D%22455%22%20height%3D%22330%22%20role%3D%22button%22%20title%3D%22MdShamimReza_2-1643549666998.png%22%20alt%3D%22MdShamimReza_2-1643549666998.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20used%20the%20below%20expressions%3A%3C%2FP%3E%3CP%3Esub(outputs('Compose_5')%2Coutputs('Compose_3'))%3CBR%20%2F%3Esub(int(outputs('Compose_5'))%2Cint(outputs('Compose_3')))%3CBR%20%2F%3Esub(outputs('Compose_5')%2C'Compose_3')%3CBR%20%2F%3Esub(outputs('Compose_5')%2C2)%3CBR%20%2F%3Esub(int(outputs('Compose_5'))%2Coutputs('Compose_3'))%3CBR%20%2F%3Esub(outputs('Compose_5')%2Cint(outputs('Compose_3')))%3CBR%20%2F%3Esub(int('Compose_5')%2Coutputs('Compose_3'))%3CBR%20%2F%3Esub(outputs('Compose_5')%2Cint('Compose_3'))%3C%2FP%3E%3CP%3Esub(18%2Coutputs('Compose_3'))%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%5Bonly%20this%20expression%20working%20but%20this%20is%20not%20suitable%20for%20me%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20is%20the%20right%20expression%20for%20me%20on%20the%20Compose%206%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EShamim%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3088863%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPower%20Automate%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

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.

MdShamimReza_1-1643549515472.png

 

When I run this flow I am getting an error listed below:

MdShamimReza_2-1643549666998.png

 

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

 

 

0 Replies