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
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

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

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (5,199)