cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vstar19
Helper V
Helper V

DataTable

Hi. 

I have a data table reading from SharePoint. 

The Data Table is displayed as 

 

Name | Description | Owner 

 

The Owner is a People and Group Column in SharePoint. 

 

Many of the items in the SPO List DO NOT have an owner and by default the Data Table shows nothing. I need it to say "Unknown" if there is no owner. 

Can i do this inside of PowerApps?, 

 

I tried to do an if statement on the datatable. At the moment it says this ThisItem.Owner.Email 

 

I tried to do this, but i couldnt get it to work If(Blank(Owner_Column2), "Unknown", ThisItem.Owner.Email.  - but the formulae does not work. 

 

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Vstar19,

Do you want to make the Owner column display "Unknown" if there is no value?

Could you please share a bit more about the scenario?

 

I think you could use the AddColumns() to achieve this.

Set the Items property of the DataTable as below:

AddColumns(
    Product,// Here replace your real data source name
    "RealEmp",
    If(
        IsBlank(Employee.DisplayName),
        "Unknown",
        Employee.DisplayName
    )
)

vqiaqimsft_0-1632970287473.png

Please remember to add the field that you use AddColumns() to add to the DataTable.

 

Best Regards,
Qi

View solution in original post

4 REPLIES 4
BCLS776
Super User
Super User

You can get statements like that to work as long as you first Unlock the data table column under its advanced settings tab. Without that change, it won't recognize that you have altered the Text property for the column.

 

Hope that helps,

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
BCLS776
Super User
Super User

Oh, and your condition should probably use IsBlank(), and not the Blank() function.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
v-qiaqi-msft
Community Support
Community Support

Hi @Vstar19,

Do you want to make the Owner column display "Unknown" if there is no value?

Could you please share a bit more about the scenario?

 

I think you could use the AddColumns() to achieve this.

Set the Items property of the DataTable as below:

AddColumns(
    Product,// Here replace your real data source name
    "RealEmp",
    If(
        IsBlank(Employee.DisplayName),
        "Unknown",
        Employee.DisplayName
    )
)

vqiaqimsft_0-1632970287473.png

Please remember to add the field that you use AddColumns() to add to the DataTable.

 

Best Regards,
Qi

Wow Thank You. I didnt even know the Add Columns existed. Thank you Very much. That worked a treat 🙂

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,785)