cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AdhamFH
Level: Powered On

convert string to int

Hello,

 

i have error like this 

error.png

 

 

 

 

 

i have try to convert it to int but i still got an error

error1.png

 

 

 

 

 

 

 

error2.png

what is wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: convert string to int

Hi @AdhamFH 

 

As I can see in the error message, you actually have an html string and that cannot be converted to an integer. Numbers in a string format can be converted using the int function but you have the string as : 3</p> </body> </html>. Assuming that this is coming from an array variable, here is the expression that you can try: 

 

int(first(split(variables('EmailKonten')[4],'<')))

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: convert string to int

Hi @AdhamFH 

 

As I can see in the error message, you actually have an html string and that cannot be converted to an integer. Numbers in a string format can be converted using the int function but you have the string as : 3</p> </body> </html>. Assuming that this is coming from an array variable, here is the expression that you can try: 

 

int(first(split(variables('EmailKonten')[4],'<')))

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

AdhamFH
Level: Powered On

Re: convert string to int

@yashag2255 wow it works, thank you 

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,769)