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 / Need help with if cond...
Power Automate
Answered

Need help with if condition

(0) ShareShare
ReportReport
Posted on by 16

Hi everyone,

 

I'm working on a flow to parse custom data from pdf invoices onto a spreadsheet. The flow is 90% complete but run into an issue. The steps of my flow are:

 

1. find folder containing PDFs
2. parse text from PDFs and store as variables
3. get first free row on Excel column
4. write variables to Excel column
5. Restart loops until all PDF is scanned

 

Here's what my flow looks like for each field.

Screenshot 2024-02-21 111101.png

 

Here's the problem. Some PDF has blank fields, so the column on Excel is also blank. But when a new PDF is scanned and it does contain value, then the blank field from the previous PDF gets filled in with the value of the new PDF. This is what it looks like.

Untitled video - Made with Clipchamp.gif

 

Notice how the second row of column B is blank, then gets filled in by the third row? I want the new value to be pasted onto the third row and leaves the second row blank. Any idea how I should approach this problem? This is what I've came up with, but it is not working. Any input is greatly appreciated. Thank you for reading my long post! Screenshot 2024-02-21 112543.png

 

  • Verified answer
    WillSG Profile Picture
    352 Moderator on at

    Hi @RPA_Noob  I hope you are doing well.

     

    The issue is being caused because you are using the Get  First Free Row to get all the columns first free row, this is  casusing the issue.

    My recommendation is to use ONLY one Get First Free Row on column A (obvoiusly) if colum A will always contains information.

    This variable can then be use across all the other Write to Excel actions for columns B, C, D and so on.

     

    Remove the Ifs and use the approach mentioned above.

     

    Please let me know if it works, happy automation!,


    If I have addressed your inquiry successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be greatly appreciated.

     

    Additionally, I offer specialized consultancy and development services leveraging PAD. If you're interested in exploring these services further, feel free to DM me, and we can initiate a discussion.

     

    Kind regards,

     

    Will SG

    Managing Director & Automation Lead

    RAMS CR (Recruitment & Automation)

    LinkedIn Profile

  • RPA_Noob Profile Picture
    16 on at

    Thank you for the fast reply! I have been dwelling on this problem for 2 days! It is so simple, why wouldn't I have thought of it? I only needed to get a free row for the first column, and the rest will follow. Kudos to you, mate! 👍

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard