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 get the selecte...
Power Apps
Answered

How to get the selected value in a listbox connected to a sharepoint list

(0) ShareShare
ReportReport
Posted on by 27

Hi all.

 

I'm bulding a simply app that include a listbox connected to a sharepoint list. The list is running fine and obtaining the values from the sharepoint list.

 

The problem is that I want to use the selected value when clicking abutton in order to execute a powerautomateflow.

 

I can not select the value and use it in the run function. I have tried different solution, the last one is to set a variable with the selected value but I can not use it with First, nor other ways, can you help me?

 

ManuArco_0-1705065156278.png

Error: Argument type not valid (record) Expected table instead.

 

Set(varIdioma; First(listaIdiomas.SelectedText).Value)

 

Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @ManuArco 

     

    Try this for a listbox:

    Set(
     varIdioma; 
     Concat(listaIdiomas.SelectedItems, Value, ";")
    )

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • ManuArco Profile Picture
    27 on at

    Thanks for the quick answer @SpongYe !!

     

    It was the error is that SelectedItems is not recognized

    ManuArco_0-1705066443324.png

    Then I changed it to SelectedText and It has other error (argument Type not valid) refered to the listBox

     

    ManuArco_1-1705066755404.png

     

     

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @ManuArco 

     

    According to my test, my code should work:

    SpongYe_0-1705068856871.png

     

    Could you share a screenshot of the controls?

     

     

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @ManuArco 

     

    According to my test, my code should work:

    SpongYe_0-1705068856871.png

     

    Could you share a screenshot of the controls?

     

     

  • ManuArco Profile Picture
    27 on at

    Hi @SpongYe 

     

    Here are the screenshots of the control:

     

    ManuArco_3-1705307405027.png

     

     

    The advice is about the sort formule can not run correctly in big values list

    ManuArco_2-1705307338744.png

     

    Properties:

    ManuArco_1-1705307318536.png

     

     

    This is how is sort using the sharepoint list

    ManuArco_0-1705307243768.png

     

    Thanks!

  • ManuArco Profile Picture
    27 on at

    I added a new control connected to the same sharepoint list in order to check:

    ManuArco_0-1705310977588.png

    With this control I'm able to check is some item is selected:

    ManuArco_1-1705311029365.png

     

    But I can not use the selected value:

     

    ManuArco_2-1705311063251.png

    Concat function has invalid values

    ManuArco_3-1705311091307.png

    Value is not recognized:

    ManuArco_4-1705311134647.png

     

     

  • Verified answer
    ManuArco Profile Picture
    27 on at

    Hi all.

     

    Finally I identified that the problem comes from the sharepoint list connections, I was getting the key column "Name" which cannot be parsed to string, I solved it by creating a new string column in the list and using it.

     

    ManuArco_0-1705591535735.png

     

    ManuArco_1-1705591592725.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard