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 Platform Community / Forums / Power Apps / Patching error - argum...
Power Apps
Unanswered

Patching error - argument does not match expected type 'text'. Found type 'Error'.

(0) ShareShare
ReportReport
Posted on by

Hello, I am trying to patch (insert) new records from the powerapps to my sharepoint list. 

Error msg: 

The type of this argument 'BU_x002f_Dept' does not match the expected type 'Text'. Found type 'Error'. The function 'Patch' has some invalid arguments.

Tried to remove the entire row of BU/Dept: BU.SelectedText.Value, however the new error shows the duration. Same error as well, just that it is 'Number'.

 

Current Code as follows: 

 

Patch (
'Teams_Creation',
Defaults ('Teams_Creation'),
{
User_display_Name: Office365Users.MyProfileV2().givenName,
User_Email: Office365Users.MyProfileV2().mail,
'BU/Dept': BU.selectedtext.value,
Site: Site.Text,
Purpose: Purpose.Text,
Date_Required: DatePicker1.SelectedDate,
Members: Members.SelectedItems,
Duration: Duration.SelectedText.value,
Date_Requested: Today()
}
)

 

Additional Info on the Sharepoint List:

BU/Dept is the name of column, Single line of text Type

Duration is the name of column, Number Type. 

Categories:
I have the same question (0)
  • jimbobcook1 Profile Picture
    102 on at

    Could you encase the BU.selectedtext.value in Text() so Text(BU.selectedtext.value) to force the text field then for the number value just put Value(Duration.SelectedText.value)

     

    It's worth a try

  • Community Power Platform Member Profile Picture
    on at

    Hello Jimbobcook1,

     

    'BU/Dept': BU.selectedtext.value(), 

    and 

    'BU/Dept': Text(BU.selectedtext.value)

    Tried and it doesn't work, shows same error and added one more line of error "invocation of unknown function". 

    Likewise for the Duration. 

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Figured out my answer somehow. Pasting here so that it may help others who are new like me too. 

     

    Patch (
    Teams_Creation,
    Defaults (Teams_Creation),
    {
    //User_display_Name: Office365Users.MyprofileV2().givenName,
    Title: Office365Users.MyProfileV2().givenName,
    User_Email: Office365Users.MyProfileV2().mail,
    BU_x002f_Dept: BU.SelectedText.Value,
    Site: Site.Text,
    Purpose: Purpose.Text,
    Date_Required: DatePicker1.SelectedDate,
    Members: Left( Concat(Members.SelectedItems, 'Display Name' & ", "), Len( Concat(Members.SelectedItems, 'Display Name' & ", "))-2),
    Duration: Value(Duration.Text),
    Date_Requested:Today()
    }
    );

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard