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

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 II
Dual Super User II

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 II
Dual Super User II

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

@yashag2255 wow it works, thank you 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (76,309)