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 / Patching a dropdown va...
Power Apps
Answered

Patching a dropdown value to SharePoint (single line) wont work

(0) ShareShare
ReportReport
Posted on by 834

Hi all,

have a weird isseue i can not work out.

  1. there's a combo box that is fed by other SPO list Sort(Distinct('List#1',Country),Result)
  2. there a button that should patch the selected value to a text column in SPO Patch('LIST#2', Defaults('LIST#2'), { Country: countryInput.Selected.Result })
  3. its not working, if I change the reference of the patch to some label or just hardcode value "x" it works, but it just wont take the value from the combo
Categories:
I have the same question (0)
  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    Your code is working fine for me, and it successfully creates new rows in list 2. I'd suggest adding a label to setting the value to countryInput.Selected.Result to verify it's pulling the value from the dropdown correctly. 

     

    Though, in my test I patched to Title. If there is another single line of text field, patching to it fails as title is required for new list items. I assume this isn't the issue you're facing as you mentioned that it works if you hard code the value.

  • Sifu Profile Picture
    834 on at

    the label also wont take the value from the combo

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    Ok, let's check on the combo box. You're currently using:

     

    Sort(Distinct('List#1',Country),Result)

     

    What is the data type of country in list 1? single line of text, choice, other? And, no errors are being displayed anywhere? The label seems to be working, but it's just blank?

     

     

  • Sifu Profile Picture
    834 on at

    its a single line of text and oddly, there's another patching connected to it which works fine. So one button with same combobox works where the other doesn't. the only difference is that the one which is not working should create a new entry (defaults) where the one that is working only updates the existing line.

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    And no errors of any kind are being displayed? From the design view, you alt-click on the button to run it, and no error appears? No little red x next to the button? Nothing? And, you're patching to sharepoint. Have you confirmed the view you're looking at isn't filtered. Perhaps the rows is getting added but you're simply not seeing it? 

  • Sifu Profile Picture
    834 on at

    no error, no filter, it actually adds a line but not the "country", just creates a new line with ID and some other basic data

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    So that actually lines up with the label test, as the label is showing a blank value, not an error, and the patch is then patching that blank value. Though it doesn't make sense that the edit patch is working, even though the value can't be displayed from the combo box into the label. Something here isn't adding up. I'd double check that the edit and new patch statements are indeed referring to the same drop-down, not just two similarly configured drop-downs. I'd also suggest focusing on getting the label test to work. If the label is blank, we'd expect a patch of that same value to also be blank.  

     

     

  • Sifu Profile Picture
    834 on at

    man, i just figured that out! at least the cause, the label shows the value if the default selected item is empty... 

     

    If(vaItemType = "new",
    LookUp('list#3', ID = varIDnew.ID, [CustomerCountry]),
    LookUp('list#3', ID = varID, [CustomerCountry])
    )

  • Verified answer
    Sifu Profile Picture
    834 on at

    @Mike2500 it looks like that if i try to input some defaultseleteditems, the label will not display anything, I tried it via lookup or filter, same thing any ideas?

     

    [LookUp('Customer visits', ID = varID).CustomerCountry]

    Or this one:
    [First(Filter('Customer visits', varID = ID).CustomerCountry).CustomerCountry]

  • Sifu Profile Picture
    834 on at

    worked it out.... the defaultselecteditems are causing it and here's the wrong and right for future generations  🙂

    right
    LookUp('list', ID = varID, {Result: CustomerCountry})


    wrong
    LookUp('list', ID = varID, [CustomerCountry])

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 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard