cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
geommm
Advocate IV
Advocate IV

INT not working on a compose

I'm disINTegrated.

 

I have a compose containing 0.5

I try to take an INT of this and I get the error:

'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
Is it my caffeine levels or what?
 

temp.png

 
 
 
 
 
 
 

temp.png

5 REPLIES 5
jinivthakkar
Super User
Super User

@geommm what are you trying to do here ? Do you want to have 0.5 as or do you want value to be 1 ?

MartinBradac
Frequent Visitor

Hello,

 

fisrt you need make int number - from 0.5 to 0

after you can set type int

 

int(first(split(string(outputs('Compose_old_total')),'.')))
 

int(0.5) is 0 in most programming languages in the history of the world

this works (not localized thought) but it's crazy! Thanks

MartinBradac
Frequent Visitor

It's crazy world. 

 

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,275)