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

Cross reference to gallery text box from data table

Hi all,

 

I wondering is it possible to pull data from a data table into a text box in a gallery.

 

at the moment I'm using this formula but to no avail. LookUp(AtaPart=TextSearchBox1,Competitor,Blank())

 

Do both data sources need to be the same format i.e. two galleries or two data tables?

 

Please see the image below for a visual representation as to what I want to do.

help_request_diagram.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Cross reference to gallery text box from data table

@david9068

Data Table is as such just a representation of a data source.

 

You must have specified some data source for the data table in the Items property , right? This is what you will have to use inyour Lookup Formula in the gallery text box

 

Lookup(DatasourceNameofDatatable, AtaPart=TextSearchBox1.Text,Competitor)

 

I am assuming that the column names AtaPart and Competitor have the same column names in the data source.

 

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.

View solution in original post

Super User
Super User

Re: Cross reference to gallery text box from data table

Concat(Filter(DatasourceNameofDatatable, AtaPart=TextSearchBox1.Text),Competitor&", ")


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

13 REPLIES 13
Super User
Super User

Re: Cross reference to gallery text box from data table

@david9068

Data Table is as such just a representation of a data source.

 

You must have specified some data source for the data table in the Items property , right? This is what you will have to use inyour Lookup Formula in the gallery text box

 

Lookup(DatasourceNameofDatatable, AtaPart=TextSearchBox1.Text,Competitor)

 

I am assuming that the column names AtaPart and Competitor have the same column names in the data source.

 

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.

View solution in original post

david9068
Level: Powered On

Re: Cross reference to gallery text box from data table

@ThatAPIGuy Worked a treat.

 

Thanks a million for your help. Just one last question, is it possible to display more that one result in the text box or will I  need multiple text boxes? I was hoping that formula would pull in all the records when it matched the TextSearchbox.

powerapps.png

Super User
Super User

Re: Cross reference to gallery text box from data table

Glad that it worked.

Lookup will return only the first record that matches the condition. To get all the matching records you need to use Filter.

Try this
Concat(Filter(DatasourceNameofDatatable, AtaPart=TextSearchBox1.Text),Competitor&", "


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.

Super User
Super User

Re: Cross reference to gallery text box from data table

Concat(Filter(DatasourceNameofDatatable, AtaPart=TextSearchBox1.Text),Competitor&", ")


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

david9068
Level: Powered On

Re: Cross reference to gallery text box from data table

@ThatAPIGuy Thats worked. 

 

Thanks for that. Once last question if you have time.

 

When trying to reverse that function like this Concat(Filter('[dbo].[AirEquivalent]',Competitor=TextSearchBox1.Text),AtaPart&",")

 

I get nothing. Can filters only look to the right like lookups do?

Super User
Super User

Re: Cross reference to gallery text box from data table

@david9068

 

It should have worked. Do you mind sharing the screenshot?


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.

david9068
Level: Powered On

Re: Cross reference to gallery text box from data table

Hi,

 

Sorry for the delay I was off sick the past few days. 

 

I did more testing with that formula and I realized it will only work after the full part number is entered. 

 

Thanks again for your help, much appreciated.

 

Regards,

David

Super User
Super User

Re: Cross reference to gallery text box from data table

If you want the formula to work for partially entered part numbers , you might want to use Search instead of filter

 

Concat(Search('[dbo].[AirEquivalent]',TextSearchBox1.Text,Competitor),AtaPart&",")

 

For search documentation refer this - https://docs.microsoft.com/en-us/powerapps/functions/function-filter-lookup

 

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.

david9068
Level: Powered On

Re: Cross reference to gallery text box from data table

Thanks for letting me know this. I will test it today.

 

Im just working on getting the text from one text box into a search box atm. I want to know if its possible to pull in multiple part numbers and display each part number below that text box. It like a multiple search box.

 

I don't know if you might have a quick solution? Or I should probably open another chat related to this subject.equiv_search_box.png

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,270)