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 select the data...
Power Apps
Answered

How to select the database (sharepoint) by using dropdown list

(0) ShareShare
ReportReport
Posted on by 12

I am the beginner, i don't know how to select the database (share point) by using drop down list in Power Apps.

Anyone can help? Thanks!😀

 

 

 

 

Switch(dropdown.Selected.Value,
 "scan001",
 ClearCollect(
 SELECTED_DB,
 scan001
 ),
 "scan002",
 ClearCollect(
 SELECTED_DB,
 scan002
 ),
 "scan003",
 ClearCollect(
 SELECTED_DB,
 scan003
 )
)

 

 

 

 

Cliffchu123_0-1658215319935.png

 

 

 

 

Patch(SELECTED_DB,{Title:BarcodeScanner1.Value, When: Now()})

 

 

 

 

 

Categories:
  • MVP-Phipps Profile Picture
    3,526 Super User 2024 Season 1 on at

    Your Switch statement is correct, but your Patch is wrong. You have not specified a record to Patch. Try this:

    Patch(SELECTED_DB, Defaults(SELECTED_DB),{Title:BarcodeScanner1.Value, When: Now()})

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    Subscribe to my YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • Cliffchu123 Profile Picture
    12 on at

    Even I amend the code, it still not working. I don't know why!

  • Cliffchu123 Profile Picture
    12 on at

    What is the problems? There is nothing in the collection! Anyone can help?

    There is no data in database after scanning !

  • Cliffchu123 Profile Picture
    12 on at

    I found something in collection, but why the data not go to the database what I select?

     

    Cliffchu123_0-1658282813031.png

     

  • MVP-Phipps Profile Picture
    3,526 Super User 2024 Season 1 on at

    Have you changed your Patch like I suggested?

  • Cliffchu123 Profile Picture
    12 on at

    Yes. But the data still cannot go to share point’

  • MVP-Phipps Profile Picture
    3,526 Super User 2024 Season 1 on at

    Please show me the error?

  • Cliffchu123 Profile Picture
    12 on at

    How the data go to database scan001 in share point instead of SELECTED-DB in the PowerApps ?

  • Verified answer
    v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @Cliffchu123 ,

     

    Maybe you could try the following formula:

    Switch(dropdown.Selected.Value,
     "scan001",
     Patch(scan001,Defaults(scan001),{Title:BarcodeScanner1.Value, When: Now()}),
     "scan002",
     Patch(scan002,Defaults(scan002),{Title:BarcodeScanner1.Value, When: Now()}),
     "scan003",
     Patch(scan003,Defaults(scan003),{Title:BarcodeScanner1.Value, When: Now()})
    )

     

     

    Best Regards,
    Charlie Choi

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard