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 Apps / Always getting a blank...
Power Apps
Answered

Always getting a blank line after patch in SharePoint List

(0) ShareShare
ReportReport
Posted on by 226

I have reviewed several videos and documentation and tried all of the scenarios to get rid of the extra blank row in the SharePoint list. Initially there were two but the "Remove" function took care of that. I got the "if(!isblank)" idea from Shane Young but that didn't work for me.

 

Remove(ProjectCodeCollection,Last(ProjectCodeCollection));
ForAll(
ProjectCodeCollection,If(!IsBlank(Hours),
Patch(ReportingDetails, Defaults(ReportingDetails),
{Title: "ResourceHrs", ProjectCode: [@inputitem].Text,'Role/Task': RoleTask, Resource: Assigned , Hours: Hours, Comments: Comments, ReportingPeriod: Dropdown1.Selected.Title, PeriodBegin: Dropdown1.Selected.Begin, PeriodEnd: Dropdown1.Selected.End}
))
);

 

Categories:
  • jv123 Profile Picture
    226 on at

    I have reviewed several videos and documentation and tried all of the scenarios to get rid of the extra blank row in the SharePoint list. Initially there were two but the "Remove" function took care of that. I got the "if(!isblank)" idea from Shane Young but that didn't work for me.

     

    Remove(ProjectCodeCollection,Last(ProjectCodeCollection));
    ForAll(
    ProjectCodeCollection,If(!IsBlank(Hours),
    Patch(ReportingDetails, Defaults(ReportingDetails),
    {Title: "ResourceHrs", ProjectCode: [@inputitem].Text,'Role/Task': RoleTask, Resource: Assigned , Hours: Hours, Comments: Comments, ReportingPeriod: Dropdown1.Selected.Title, PeriodBegin: Dropdown1.Selected.Begin, PeriodEnd: Dropdown1.Selected.End}
    ))
    );

     

  • Verified answer
    WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @jv123 ,

    You have two initial issues I can see - potential ambiguity with identical field names and also your ForAll Patch is backwards. ForAll is not designed to be a Loop, although it can work this way with considerable performance penalty as it does an individual Patch for each record. ForAll() creates a Table, which can be patched in one action provided its content is correct. For new records, this is simply a Table with field names and field types matching the list. None of it really explains the blank line, but try this

    Patch(
     ReportingDetails,
     ForAll(
     Filter(
     ProjectCodeCollection,
     !IsBlank(Hours)
     ) As aPatch,
     {
     Title: "ResourceHrs", 
     ProjectCode: [@inputitem].Text,
     'Role/Task': aPatch.RoleTask, 
     Resource: aPatch.Assigned , 
     Hours: aPatch.Hours, 
     Comments: aPatch.Comments, 
     ReportingPeriod: Dropdown1.Selected.Title, 
     PeriodBegin: Dropdown1.Selected.Begin, 
     PeriodEnd: Dropdown1.Selected.End
     } 
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard