cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PeKi72
Post Patron
Post Patron

Remove the zero's from a number stored in a variable

Dear experts,

I have a  variable called "InputC" that contains a number 00012345. Now before i pass the variable to the get-items connector I want to remove the zero's. I know i have to use the float. But i am very bad in expressions.

PeKi72_0-1669836500332.png

 

Gr.P

1 ACCEPTED SOLUTION

Accepted Solutions
edgonzales
Super User
Super User

Hey there.  You've got it....  if you just wrap the output of your variable in a float(), it will have the desired result.  Something like this in your expression window (replace the bold bit with the dynamic output of your variable:  

 

float(variables('varTest'))
 
Good work!  Keep us posted.
-Ed
 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

1 REPLY 1
edgonzales
Super User
Super User

Hey there.  You've got it....  if you just wrap the output of your variable in a float(), it will have the desired result.  Something like this in your expression window (replace the bold bit with the dynamic output of your variable:  

 

float(variables('varTest'))
 
Good work!  Keep us posted.
-Ed
 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,427)