cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TWolsten
Level: Powered On

Filter DataTable based on DataField

Hi all,

 

Hope you can help as I have tried to find a solution on the Boards but I must be either missing something or just having a brain freeze.

 

So I have two lists, bp_changelog and bp_live.

 

On the bp_live list ViewForm there is a ID Field (DataCard1).

 

I would like to pull the ID Field and filter the DataTable (bp_changelog) below with just the relevant IDs based on the bp_live ID Field.

 

I currenlty have:

Filter(bp_changelog, "DataCard1.Value" in Lower(Title) )

 

As my formula but the "DataCard1.Value" is the part I am struggling with as if I put a value (e.g "760-1") instead the list filters nicely.

 

Sorry for the probably simple issue but help would be greatly appreicated!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Filter DataTable based on DataField

According to the documentation the Filter function doesn't work with Data Tables at this time.

Data table control in PowerApps  look under "Not yet available"

 

You could try and use the search function.

Search(bp_changelog, DataCardValue1.Text, "Title")

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Super User
Super User

Re: Filter DataTable based on DataField

@TWolsten

 

Do you have any specific reason of using the data table instead of a gallery?

 

If not, you can format the gallery to almost like a data table -

2018-02-10 12_09_52-Test - Saved (Unpublished) - PowerApps.png

 

This way you can use filter and it will be delegable.

 

 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



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

16 REPLIES 16
Super User
Super User

Re: Filter DataTable based on DataField

Since I can't see your form I am just taking a guess. It looks like you are referencing the data card and not the field inside the card. Out of the box the field name would be something like DatCardValue1.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
TWolsten
Level: Powered On

Re: Filter DataTable based on DataField

Thank you for the help!

 

I managed to get a little further but it is still not 100% working.

 

Filter(bp_changelog, DataCardValue1.Text = Title)

 

If I change Filter for Search it works but as the list is more than 500 I would need the Filter function to work.

 

Any ideas why the above would be working?

TWolsten
Level: Powered On

Re: Filter DataTable based on DataField

Hope someone has an idea of the issue =(

 

Any help would be greatly appreciated!

Super User
Super User

Re: Filter DataTable based on DataField

@TWolsten

 

Try this

 

Filter(bp_changelog, Title = DataCardValue1.Text )

 

If I understand right, you are filtering the rows where the Title column of bp_changelog is equal to the datacardvalue1.text

 

hope this helps


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TWolsten
Level: Powered On

Re: Filter DataTable based on DataField

Yes, that is exactly what I am trying to acheive.

 

I have tried your solution but it brings back a black DataTable.

 

Would the values in the DataCareValue matter as they vary. For example some are like 760-1, RLW111111 & GEO123456?

Super User
Super User

Re: Filter DataTable based on DataField

It should filter , irrespective of the values.

 

Do you mind sharing some screenshots? so that I can understand better.


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TWolsten
Level: Powered On

Re: Filter DataTable based on DataField

Hi vivekb,

 

Here is a screenshot which I have annotated that hopefully helps where information is being stored.

 

LookupImage.png

Super User
Super User

Re: Filter DataTable based on DataField

According to the documentation the Filter function doesn't work with Data Tables at this time.

Data table control in PowerApps  look under "Not yet available"

 

You could try and use the search function.

Search(bp_changelog, DataCardValue1.Text, "Title")

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

TWolsten
Level: Powered On

Re: Filter DataTable based on DataField

Not the best news but thank you for getting to the bottom as to why it was not working.

 

Search function would not suffice due to it not being under delegation. Maybe something to submit to the PowerApps team.

 

Thank you for all the help!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 103 members 5,535 guests
Please welcome our newest community members: