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

Datatable display based on form data

I am trying to get the Datatable on the bottom of the screenshot to display list rows when a user types in the "Oracle Number" from the top form.  I tried a lookup function based on the form, but it did not work.  Is this possible?  

 

ksmith23_0-1650122226804.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
PK_Hong
Helper V
Helper V

Hi @ksmith23 

 

I guess you wish to Filter(Datatable) based on the data in "Oracle Number".
Wish I am right.

 

Pretty straighforward if so

DataTable.Items = Filter(datasourceOfYourDatatable, "Oracle Number" = TextInputofOracbleNumber.Text)
Just a normal Filter.

 

Wish My guessing is correct.

 

have a nice day

PK Hong / hpkeong

View solution in original post

6 REPLIES 6
Drrickryp
Super User
Super User

@ksmith23 

Please explain the table structure for your app.  Is all the data in a single table or are there two tables in a one to many relationship?

It is a one (form input) to many (data table) on the app itself, but all data is located on the same list.  The user inputs data on the form that populates the list, and I am trying to get the data table to display all records from the list that have the "Oracle Number".   Does that make sense?  I am pretty new to Powerapps, so my terminology is probably off.

Drrickryp
Super User
Super User

@ksmith23 

It sounds like you have a single table containing a one to many relationship.  I suggest you normalize them by separating out a second table. Please see my blog post starting here about how to do this and why it is a "best practice". https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/Relational-database-design-and-PowerAp... 

PK_Hong
Helper V
Helper V

Hi @ksmith23 

 

I guess you wish to Filter(Datatable) based on the data in "Oracle Number".
Wish I am right.

 

Pretty straighforward if so

DataTable.Items = Filter(datasourceOfYourDatatable, "Oracle Number" = TextInputofOracbleNumber.Text)
Just a normal Filter.

 

Wish My guessing is correct.

 

have a nice day

PK Hong / hpkeong

Drrickryp
Super User
Super User

@PK_Hong 

You are right, but the table is poorly designed. 

That worked, thank you for the help.  I may have not explained it very well.  I am using the form as the input to the list, and the Datatable as the view of the list since it can display multiple records.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,243)