web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Converting String to I...
Power Automate
Unanswered

Converting String to Integer with Sharepoint

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I am currently building a flow that requires a conversion from String to Integer (Sharepoint does not recognise Number as Integer hence I need to convert) and I have been trying to perform a string to integer conversion from the values to be retrived from Sharepoint but my flow does not run properly despite following many instructions. Basically, what I am trying to do now is to increment my "Status" value by 1 every time an automated email is being sent out so that I can keep track of who is not replying to my emails. Can anyone point out on what I have been doing wrongly and advise accordingly? 

 

TPkentan_1-1674031166519.png

 

Any help would be greatly appreciated.

 

Categories:
I have the same question (0)
  • Verified answer
    Sundeep_Malik Profile Picture
    6,484 on at

    Hey @Anonymous 

     

    Actually we cannot initialize variables inside an apply to each loop.

    So, if I talk about other languages like java, we can make a local variable inside a loop but in case of Power Automate that is not possible.

    A workaround for this is, above/outside your apply to each loop, initialize a string variable, keep it empty.

    Now come inside your apply to each loop, and use action: set variable, and pass the status in it. Now it should work. 

     

    Sundeep_Malik_0-1674032706728.png

     

    I hope this helps 🙂

  • Community Power Platform Member Profile Picture
    on at

    @Sundeep_Malik Thanks for your help! The flow now seems to work. Side-tracking a little but do you happen to know how to increment value by +1 when a certain time has passed for eg 1 minute and every minute passing, the "Counter" column will auto increase and the just converted "String" to "Integer" will take the original value from Sharepoint and update it on the "Counter" column with the now function that I am trying to perform. (Lets say default value is 1 and after 1 minute, it will update it to 2 in Sharepoint). I have attached a photo in my Sharepoint for better understanding. (This function will only run when the "Status" field is in "Check")

     

    TPkentan_1-1674034959782.png

     

     

  • Sundeep_Malik Profile Picture
    6,484 on at

    @Anonymous 

    Its should be possible, but it would be really difficult to track that, not sure how that will happen. Can you elaborate in a better way? Like what time you are expecting there?

    Till the status remains check, it should calculate the time, or till the flow is running?

     

    If its the first case, then you will have to make a separate flow for this, but its not the best approach, because if the flow remains running for more than 30 days, the flow will stop.

     

    @VictorIvanidze did you understand the part??

     

  • VictorIvanidze Profile Picture
    13,073 on at

    @Sundeep_Malik,

    no I didn't.  

  • Community Power Platform Member Profile Picture
    on at

    @Sundeep_Malik Apologies for the bad explanation. I will try to explain clearer in this post.

     

    For the main objective of this flow, I want to send an automated email to my colleagues with options "Yes" and "No" for them to respond to. The default value of the email option when not replied would be "Check" (As seen from the Status column).

     

    The purpose of this specific flow is that if my colleagues did not respond within 1 day (I am using scheduled automate flow for this to be performed every 24 hours), the Status column would still be "Check" and the Counter column will increase from the default value of 1 to 2 and so on, increasing the value every time that they did not respond to my emails (So I can track how long they have not been responding to my emails and taking actions accordingly if it exceeds a certain limit) until they responded to me would then the Counter stop. The problem with Sharepoint is that it does not recognize Numbers as Integers so I had to convert from a "Single Line of Text" format (Used to store Counter) to Integer with the use of some Variable/Compose formula. Below attached are the flow explanation that I am trying to do and basically after retrieving the "Counter" value in Sharepoint, Automate will increase that value by +1 and convert it back from integer to string and update it into Sharepoint accordingly. 

     

    TPkentan_0-1674089104443.png

     

    I hope this explanation helps even slightly! Hope to hear from you soon.

     

    P.S according to your question, this flow would be running once per day via a separate scheduled email sender so it shouldnt be a problem stopping the flow. The flow will always be triggered daily until my colleagues replies to my email with options.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard