Notifications
Announcements
I am using a text file that stores an integer that is being used as a counter.
How would I read that files contents into a variable and then increment the variable by 1 and overwrite the data in the same file ?
This is possible. Below are the steps if the txt file is stored in SharePoint.
In short, you need to:
You can convert between integer and string by using the int() and string() expressions.
Below is the full flow:
I cannot find any "Counter" action
Counter is the custom name given to the action.
The action's name is "Initialize Variable" followed by an "Increment Variable".
So that is a set variable action ?
It's the initialize variable action. You can't set or increment a variable without first initializing (creating) it.
So my get input from file action is buried in my flow and it made me do the initialize variable at the begging of the flow.
Will that work if I read and set the variable at the beginning of the flow and increment later in the flow depending depending on a condition ?
yes, you can initialize on the top level and leave the variable empty. Then later down in the flow, use a set variable action to add the data into the variable followed by the increment variable.
Worked great. Thank you so much.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 522 Super User 2025 Season 2
Tomac 364 Moderator
abm abm 243 Most Valuable Professional