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 / Patch Button OnSelect ...
Power Apps
Answered

Patch Button OnSelect to Save TextInput Value to to SP list

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

Hi,

 

I am trying to Patch my onselect button here to patch my field in my SP list. How can I do this? The dropdown and textinput are not datacards or in a form, they just exist on screen.

 

wonka1234_1-1694092210353.png

 

Trying this - but getting error - Name isnt value. 'ThisItem' isnt recognized.

Patch('Data Source', ThisItem, {'impact comment': TextInput1.Text });

 

Also trying - getting invalud arguement type (Number). Expecting a record value instead.

Patch('Data Source', gblRecordID, {'impact comment': TextInput1.Text });

 

any help would be appreciated.

Categories:
I have the same question (0)
  • gcmfaizan Profile Picture
    1,022 on at

    @wonka1234 can you try lookup inside the patch like this:

    Patch('Data Source', LookUp('Data Source', ID = ThisItem.ID), {'impact comment': TextInput1.Text})

     

     

    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

     

    Thanks!

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @gcmfaizan  getting error  incompatible types for comparison. These types cant be compared. Number; Error.

  • gcmfaizan Profile Picture
    1,022 on at

    @wonka1234 can your try this like:

    Patch('Data Sources', LookUp('Data Sources', 'Data Source' = ThisItem.'Data Source'), {'impact comment': TextInput1.Text})

     

    you see I use a singular name inside the lookup.

     

    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

     

    Thanks!

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @gcmfaizan  imcompatible types for comparison. These types cannot be compared. Table. Error.

     

    . Why are you using plural vs singular data source? 

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    bump

  • Verified answer
    Woody2312 Profile Picture
    36 on at

    Hi Wonka1234,

     

    Have you tried,

     

    Patch(
            DataSource,
            Defaults(DataSource),
            {
               Column Name: TextInput1.Text,
               Column Name: Dropdown1.selected.Nameoffield
                
               
            }
        )
    )
  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @Woody2312  trying this  on the OnSelect of my button.

     

    Patch(
     'Data Source'
     Defaults('Data Source'
     {
     'impact comment': TextInput1.Text,
     
     }
     )
    )

     

    getting error - Expected operator.

  • Woody2312 Profile Picture
    36 on at

    Take the comma out after .Text

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
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard