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 Apps
Answered

Issues with Patch

(0) ShareShare
ReportReport
Posted on by 391

Hello! I am attempting to patch some info into a sharepoint list and I am getting an unfamiliar error. 
Here is the error, and a copy of my code. JobNumAndName is a dropdown, the rest are text fields. Ideally all that would need to be done is to select a jobsite from the dropdown, input the notes, and press submit and in the background it would autofill the date/time, and glbuser into the sharepoint list. It is also giving the issue 'the type of this argument 'JobNumAndName' does not match the expected type 'Text'. Found type 'Record'. which is why I put .selectedtext on the dropdown. This same layout for Patch works just fine in other parts of my app, but not here. 
Any advice? Am I missing something? 

CodyO_0-1708383438903.png

 



Patch('Job Notes Master', Defaults('Job Notes Master'),
{Submitter:glbUser,
Notes:'txt.Notes',
JobNumAndName:DD_JobNumAndName2.SelectedText,
ActivityDateAndTime: Text(Now(), DateTimeFormat.ShortDate)
}
)



Categories:
I have the same question (0)
  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @CodyO 

     

    Try:

    Patch('Job Notes Master',
     Defaults('Job Notes Master'),
     {
     Submitter: glbUser,
     Notes: 'txt.Notes',
     JobNumAndName: Text(DD_JobNumAndName2.Selected.Value),
     ActivityDateAndTime: Text(Now(), DateTimeFormat.ShortDate)
     }
    )

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • CodyO Profile Picture
    391 on at

    It still isn't liking this part specifically, It is saying that .value isn't recognized. Do I need to change anything on the sharepoint side? On the main page of my app I have a patch for a dropdown setup exactly like my original code, and the sharepoint settings are the same, just a different list. Why would it not be working here? 

    Text(DD_JobNumAndName2.Selected.Value)

     Thanks for your help @AARON_C !

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @CodyO 

     

    So just to confirm, in SharePoint, your column types are:

    • Submitter - Text
    • Notes - Text
    • JobNumAndName - Choice
    • ActivityDateAndTime - Text
  • CodyO Profile Picture
    391 on at

    @AARON_C 
    Currently all 4 of those are Text! 

  • Verified answer
    AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @CodyO 

     

    I made a test on my side. The code below, I am able to select an option from a drop down control and save it in a column of type text.

    Patch(
     'Test List', // My SharePoint list
     Defaults('Test List'),
     {
     Title: TextInput1.Text, // Text column
     testText: Text(Dropdown1.Selected.Value) // Text column
     }
    )

     

    What do you have in the Items property of your drop down? 

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

  • CodyO Profile Picture
    391 on at

    I bumped accept as solution when I meant to type reply, but your assistance is still helpful in getting to the solution! 

    I currently have the dropdown linked to a different list than where this is being patched. "Master Job Tracker" 
    The Item is: Master Job Tracker
    The value is: JobNumAndName

    I am going to use the code you provided and see if that works!

    Edit, I attempted that code

    CodyO_0-1708473182720.png

     

  • AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    @CodyO 

     

    I just tested my drop down with a different list to where I was patching too and it worked fine.

     

    Was there any other errors other than Value was not recognized?

  • CodyO Profile Picture
    391 on at

    These are the only two errors showing: I am really confused why it suddenly is having an issue with .Value as it has worked and is currently working in other parts of the app. The only difference is some of the other dropdowns are in a canvas, whereas this one isn't but when I tried to duplicate that, I got the same error.

    Name isn't valid. 'Value' isn't recognized

    The requested operation is invalid. Server Response: Job Notes Master failed: Object must implement IConvertible.clientRequestIDL a730b8c8-6036-4293-8e21-f953bd669637 serviceRequestId:a730b8c8-6036-4293-8e21-f953bd669637

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard