Reputation: 1
I have a folder with hundreds of PDF files that I get from customers. I keep track of the customer each file belong to by adding a unique ID at the front of every filename followed with a hyphen. I then have an excel master list where I keep track of the latest name for each customer and their unique ID. Goal now was to create a database that users could access all the files that I saved. Overall goal is now to create a library of all the pdf files where users could also see the customer names or any fields I might decide to add (e.g., date processed, date modified, etc..).
I decided to try Power App. My first data source is the folder to all my pdf files. My Second data source is the excel master list table.
(See example 1 for data sources)
So far, I created a gallery with multiple text labels as columns (Unique ID, Customer name, Filename, Download image):
(See example 2 for example of Gallery results)
Here is the challenge:
In the gallery Im only able to figure out how to search for text within the filenames. I cant for the life of my figure out how to filter for the [Unique ID] and [Customer name] I created in the gallery.
Example:
Formulas/functions I tried but nothing works:
Search(Gallery1,Txt_Search.Text, UniqueID)
Search(Gallery1,Txt_Search.Text, UniqueID.value)
Upvotes: 0
Views: 88
Reputation: 87228
If you create a table that has all the columns which you want to search, then you can use that in the Items property of the gallery with the appropriate Search expression. It should be something similar to the code below:
Search( // (3)
AddColumns( // (2)
AddColumns( // (1)
Filenames,
UniqueID,
Trim(First(Split(FileName, "-")).Value)
) As FromFile,
'Customer Name',
LookUp(
MasterList,
ThisRecord.UniqueID = FromFile.UniqueID,
'Customer Name'
)
),
Txt_Search.Text,
UniqueID,
'Customer Name',
FileName
)
In the expression above, we:
Upvotes: 0