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 / issue with data table
Power Apps
Unanswered

issue with data table

(0) ShareShare
ReportReport
Posted on by 32

I have a data table that works perfectly with the following:

   Sort(Filter(Projects,StartsWith(StateProject,drpStateList_1.SelectedText.Value),Status1="Active"),ProjectName)

I want to add a blank row at the top of the list.

So I added the following:

Ungroup(
    Table(
        {WFPOOptions: Table(
           {State: Blank()},
           {ProjectID_static: Blank()},
           {ProjectName: Blank()})},
        {WFPOOptions: Sort(Filter(Projects,StartsWith(StateProject,drpStateList_1.SelectedText.Value),Status1="Active"),ProjectName)}),
     "WFPOOptions")
)

This doesn't work at all. No data is presented.

The first column is a dropdown in the SharePoint List. Could that be a problem?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at

    Hi @hcharrisbna ,

    Try a gallery instead - Data Tables are not always reliable with complex Items

  • hcharrisbna Profile Picture
    32 on at

    I created a gallery and was able to use a filter but not able to add a blank row at the top. When I add the code above, no records are returned, same result as using the data table. Thanks for the reply. Any other suggestions?

     

     

  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at

    Hi @hcharrisbna ,

    Try this - I tested here with similar value types and got the expected result.

    Ungroup(
     Table(
     {
     WFPOOptions: 
     Table(
     {
     State: Blank(),
     ProjectID_static: Blank(),
     ProjectName: Blank()
     }
     )
     },
     {
     WFPOOptions: 
     Sort(
     Filter(
     Projects,
     StartsWith(
     StateProject,
     drpStateList_1.Selected.Value
     ),
     Status1 = "Active"
     ),
     ProjectName
     )
     }
     ),
     "WFPOOptions"
    )

     

    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

     

  • hcharrisbna Profile Picture
    32 on at

    I'm sorry to say, still no joy. Result the same: nothing returned to the gallery.

     

    Thank you for the response and for trying. 

  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at

    Hi @hcharrisbna ,

    Does this return anything ?

    Filter(
     Projects,
     StartsWith(
     StateProject,
     drpStateList_1.Selected.Value
     ),
     Status1 = "Active"
     )
    )

     

  • hcharrisbna Profile Picture
    32 on at

    I had to change your code to:

     

    Filter(Projects,StartsWith(StateProject,drpStateList.SelectedText.Value),Status1="Active")

     

    and that runs. When I add the Sort:

     

    Sort(Filter(Projects,StartsWith(StateProject,drpStateList.SelectedText.Value),Status1="Active"),ProjectName)

     

    it runs. It's when I try to add the blank values for the first row that it fails:

     

    Ungroup(
    Table(
    {
    WFPOOptions:
    Table(
    {
    State: Blank(),
    ProjectID_static: Blank(),
    ProjectName: Blank()
    }
    )
    },
    {
    WFPOOptions:
    Sort(
    Filter(
    Projects,
    StartsWith(
    StateProject,
    drpStateList.Selected.Value
    ),
    Status1 = "Active"
    ),
    ProjectName
    )
    }
    ),
    "WFPOOptions"
    )

  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at

    @hcharrisbna ,

    Try it with just blank for State  - the others should be blank by default in that record when the rest of the table records are created.

  • hcharrisbna Profile Picture
    32 on at

    That appears to be working. I want to test some more but .... stay tuned.

  • hcharrisbna Profile Picture
    32 on at

    After some quick testing, kudos to you, that fix worked. Thank you!!! 

     

    There are many things about Powerapps that don't seem to make sense to me. After the change you suggested, one of the columns being displayed had no data. Fiddling around with the items list, I found that the column in the SharePoint list was not available when I tried to relink it. The column, through trial and error, was finally located as "(Name)", not the column name in SharePoint. This makes no sense to me just as removing the two columns in first line of the Ungroup command made no sense. If you have any explaination i would like to hear it to improve my understanding.;

     

    Thanks again for your help. I really appreciate it.

     

    Carter

  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at

    Hi @hcharrisbna ,

    Sorry I have not come across that one before 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 936

#2
Valantis Profile Picture

Valantis 604

#3
11manish Profile Picture

11manish 518

Last 30 days Overall leaderboard