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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Not writing the last row
Power Automate
Unanswered

Not writing the last row

(0) ShareShare
ReportReport
Posted on by 164

Update: I have found the issue already. Thanks for all that read

 

Hi all, i have a flow which retrieves from email messages. However, the last row is not being written. I will show snips of parts of my codes and i hope that you guys can help. Thanks

 

Firstly, this variable sets the different subfolders that the email gets read from. There are a total of 50 subfolders, and when being split, it will become a list of values from 0-49.

Alphadrag_0-1656307079341.png

 

Secondly, this variable here sets the different keywords which are being read from the email messages. Similarly, there are a total of 50 keywords and when being split, it becomes a list of values from 0-49.

Alphadrag_1-1656307268968.png

 

This variable is set to 0.

Alphadrag_2-1656307367107.png

 

Next, a for loop is being used to loop through each of the subfolders from subfolders list.

Alphadrag_3-1656307414949.png

 

Next, I will be showing a sample on how the email is being read. The Mail folder is based on the for loop. The subject is being retrieved from the list of keywords starting from the variable "CurrentVar" of 0 (set in the variable shown above). This variable will then increase by 1 after a folder is being read (see 2nd image below retrieving outlook messages).

Alphadrag_4-1656307503951.png

Alphadrag_5-1656307719979.png

 

After retrieving the email messages from the folder, it will go through a series of conditions and update it inside the excel with the status. However, this is the part where I am having an issue with. Even though there is just nice 50 rows, which is equivalent to the list of keywords and subfolder, 0-49, the last row does not seem to be writing it out. I have checked through the logs of the flow and it reads something but it just does not get written out here. Anybody knows why? Appreciate your help.

Alphadrag_6-1656307952259.png

 

Sample on how the value gets written

Alphadrag_1-1656309781538.png

 

 

 

 

 

I have the same question (0)
  • Gidi Profile Picture
    601 on at

    Hi,

    have you considered that data variables starts with 0 index and excel sheets with 1?

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 427

#2
Vish WR Profile Picture

Vish WR 316

#3
David_MA Profile Picture

David_MA 260 Super User 2026 Season 1

Last 30 days Overall leaderboard