0
votes

I am currently builidng a PowerApp and I am struggeling with a simple search function. I connected the PowerApp to a SharePoint list (see image 1).

The SP-List 'Projekt' consists out ouf:

  • Columns: Service | Car | Car_ID | Workitem
  • Type: Text | LookUp | LookUp | LookUp

  • [SharePoint List][1]

    I try to filter the text by using search. As long as I am using search on Service, everything works as expected. But if I use search on one of the other columns, the code returns an error, saying "Wrong Column Type. Expects text type" (Image 2)

    Search('Projekt', "Item1", "Workitem")
    

    Error

    I assume it is due to the LookUp type, but I am not sure. Has anybody takled this problem and knows a workaround? Very happy for any suggestions

    Best Regards

    1

    1 Answers

    0
    votes

    Sorry, but I don't think this is going to work for you unless you change your underlying sharepoint list or use a collection.

    The documentation on "Search" in powerapps say that "the column must contain text."

    On most power platform applications, if you look into a Sharepoint list's lookup field or choice field, what you're actually looking at is called a "record," which is a single list that contains several items. Powerapps is expecting a string, but you're giving it a "record," so it's throwing an error.

    I'd recommend you create a collection, and use that for what you're doing.

    Try this: ClearCollect(NewCollection, ShowColumns('Projekt', "WorkItem"));

    Then, you should be able to do things like:

    NewCollection.WorkItemColumn1.value ...