cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
haqian
Frequent Visitor

Data Table

Is there a way to display specific data in a data table depending on what the user selects? I currently have the data table items set to "HomeDisplay.Selected", but for some reason none of the data is displaying. The same code works for a gallery, but I need it to work for a data table. 

Edit: To clarify, the Home Display is a gallery that is being shared with the same excel table as the data table I want to display. What I'm trying to do is if the user selects a row of the Home gallery, then the data table on another page will display the information in that one row. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @haqian ,

Based on the issue that you mentioned, I think you have something wrong with it. The Items property of the Data Table is required to provide a Table value, but the result the HomeDisplay.Selected formula returned is a record value.

 

If you want to display the selected item from your Gallery within a Data Table directly, I afraid that there is no way to achieve your needs.

 

As an fixed solution, please consider try the following workaround:

Set the OnSelect property of your Gallery to following:

 

ClearCollect(
             SelectedItem,
             ThisItem   // or type HomeDisplay.Selected here
)

 

 

then set the Items property of the Data Table to following:

 

SelectedItem

 

then enable desired fields within this Data Table.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
eka24
Super User
Super User

it depends on where you are displaying the data.

If display in a form use:

DataTableName.Selected

 

If display in a Textbox use:

DataTableName.Selected.ColumnName

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

v-xida-msft
Community Support
Community Support

Hi @haqian ,

Based on the issue that you mentioned, I think you have something wrong with it. The Items property of the Data Table is required to provide a Table value, but the result the HomeDisplay.Selected formula returned is a record value.

 

If you want to display the selected item from your Gallery within a Data Table directly, I afraid that there is no way to achieve your needs.

 

As an fixed solution, please consider try the following workaround:

Set the OnSelect property of your Gallery to following:

 

ClearCollect(
             SelectedItem,
             ThisItem   // or type HomeDisplay.Selected here
)

 

 

then set the Items property of the Data Table to following:

 

SelectedItem

 

then enable desired fields within this Data Table.

 

Please consider take a try with above solution, then check if the issue is solved.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,610)