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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Selected items from a ...
Power Apps
Answered

Selected items from a List to a Listbox

(0) ShareShare
ReportReport
Posted on by 30

Hello Team,

Power App is new to me. I'm constructing a new form and ran into a problem. I'm collecting data from one Sharepoint list (which looksup data from another SP list) using the Choices option and adding it to a listbox. I have another List box and another column for the same SharePoint list, such job title. When I add names using the +button, I want the job title to instantly appear on the second list.
I know you can help me and appreciate your help.

 

Thanks,

Jon

Categories:
I have the same question (0)
  • jijjhn Profile Picture
    30 on at

    Not sure I was clear on the my pervious message 

     

     I have a list of data that is being pulled from one Sharepoint List (which Lookup the data from another SP list) by utilizing the Choices option, and I am putting the selected things to a listbox (for example, a list of names). In the same sharepoint list, I have another column for things like Job titles, and I also have another list box. What I want to do is that if I add names to the list by using the Add button, the job titles should also be added to the second list based on the names. This should happen automatically.

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @jijjhn,

    Could you please show me a sample data to explain the realtionship between the name and job title?

    Is there any comparison relationship that I can refer to?

  • jijjhn Profile Picture
    30 on at

    Thank you for your comment on this matter. Both the name and the Job title come from the same SharePoint list. I am able to transform the matched result to a text label by using the lookup "LookUp('SPlistDB',ID=(DataCardValue19.Selected.Id),'Job Title')" where the datacardvalue 19 is the name.

     

    I want this matching result to be added to a list box automatically when I add the names, (I have two listboxes where I pull the names using the Choice and Lookup methods, and I want this matching result to be added to one of those list boxes).

     

    Thanks,

    Jon

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    HI @jijjhn,

    You don't answer my questions directly😂, sometimes, a screenshot is the best way for me to understand your scenario...

    You even don't tell me how you set the Items property of the second listbox.

     

    Well, then you should populate the second list box with a dynamic collection based on DataCardValue19.Selected name.

    Set the OnChange property of DataCardValue19 as below:

    Collect(colJobTItle,LookUp('SPlistDB',ID=(DataCardValue19.Selected.Id),'Job Title')

    Then set the Items property of the colJobTitle

     

    Or you could add a new button and use Patch() to update the data source you populate the second list box with as below:

    Patch(DataSource_in_listbox2,Defaulst(DataSource_in_listbox2),{jobTitle:LookUp('SPlistDB',ID=(DataCardValue19.Selected.Id),'Job Title'})
    

     

  • jijjhn Profile Picture
    30 on at

    Thanks Qi, That worked , Thanks for helping me appreciate your help.

    Yes I agree pictures talk better than us next I will sure put screenshots 

  • jijjhn Profile Picture
    30 on at

    Hello , I have one more question connecting to it, now the SP list not updating the selected items in the drop down list when I Patch the whole form I have checked the update property but not sure the DataCard update values are correct ? or Do I have to patch it separately or can be added to SP list when I submit the whole form 

     

    jijjhn_0-1697354772932.png

    jijjhn_1-1697354829521.png

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard