I am trying to create a search functionality with a gallery list. I was able to do it for one column, but not all five columns I want to be able to search. I am not sure why. I do not think I'm referencing the columns correctly.
For the gallery, the Items property has the following:
Filter(AddColumns(SharePointList1 as Main, "CustomerDetails", Lookup(SharePointList2, Email=Main.'Customer Email')),
StartsWith(ColumnName1, TextInput.Text) Or StartsWith(ColumnName2, TextInput.Text) Or StartsWith(ColumnName3, TextInput.Text) Or StartsWith(ColumnName4, TextInput.Text) Or StartsWith(ColumnName5, TextInput.Text))
The first part I am joining two tables from SharePoint to be viewed in the gallery. I got help from the wonderful @LaurensM with the joining, which works:
Solved: Re: Joining multiple tables for gallery view - Power Platform Community (microsoft.com)
So, for when I try typing in one of the columns, like Program, PowerApps starts giving me options below to select from which are a Data Card for Program and Data Value for Program from the first screen of my app, but my gallery that I am doing is like 13 screens later in a different module where I think I should be referencing the text in that gallery, not whatever is on screen 1 for that field. However, PowerApps only prepopulates below those two options to type in for Program. How should I be referencing the column name? Programs, for example, is in SharePointList2.
For the column referenced that does work, it is an ID from SharePointList1. I am just referencing it like how it appears as referenced in the Text property of the gallery. When I try to do similar referencing of the text of the gallery for the other columns, it is not working. It says, "The function 'StartsWith' has some invalid arguments. Name isn't valid. 'Program' isn't recognized." However, it is referenced as Program in the Text property of the Gallery (i.e. ThisItem.CustomerDetails.Program) I am not sure how I should be referencing the text or why it isn't working
Any tips/help appreciated!