web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Lookup based Ar...
Power Apps
Answered

How to Lookup based Array of string in Power Apps

(0) ShareShare
ReportReport
Posted on by 12

Hi All,
I'm stuck in a logic where I need to lookup a SharePoint List based on a string that have comma separated employeeIds.
Here is my requirement -
I have an employeemaster list in SharePoint where I have employee people picker and custom employeeId column and first name and last name columns.
In my application I have a combo box in which I'm binding EmployeeMaster list with FirstName and storing regarding employeeIds in comma separated strings in Azure Sql table. But while displaying on view screen I'm not able to query so that all the employees display with firstname.
To store Ids in Sql I'm using something like this -
On default property on textbox-
If(Form3.Mode=FormMode.View,Parent.Default,Concat(DataCardValue19.SelectedItems.'Employee ID',Concatenate(Text('Employee ID'),",")))
On datacard update property -
TextInput7.Text
On DefaultSelectedItems property of combobox -
Filter(EmployeeMasterData,'Employee ID' in ThisItem.StEmployeeID)
On view screen I'm using something like this 
LookUp(EmployeeMasterData,'Employee ID'in (ThisItem.StEmployeeID),'First Name')  Bur it is getting only one value.

Please assist how I can query all my EmployeeIDs and display all the names on View.


Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @SharePointDev ,

    Do you mean that:

    1)in employeemaster list, you have an employeeId column;

    2)in Azure Sql table, you have a column to store selected ids;

    3)use a combo box to display employeeId in employeemaster list, use a textinput to display selected ids?

    If so, you should set like this:

    In edit screen:

    1)combo box's Items:

    EmployeeMasterData

    combo box's DefaultSelectedItems:

    Filter(EmployeeMasterData,'Employee ID' in ThisItem.StEmployeeID)

    2)textinput's Default:

    If(Form3.Mode=FormMode.View,Parent.Default,
     Concat(DataCardValue19.SelectedItems,'Employee ID'&",")
     )

    3)This datacard's Update:

    TextInput7.Text

     

     In view screen:

    Do you want to display all related first names?

    If so, you could set one label's Text like this:

    Concat(
     Filter(EmployeeMasterData,'Employee ID'in ThisItem.StEmployeeID),
     'First Name'&","
     )

     

     

    Best regards,

  • SharePointDev Profile Picture
    12 on at

    You're like an angel for me Thank you so much.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard