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 to a SharePoint
Power Apps
Answered

Patching to a SharePoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello All,

 

I have created a Request Form and am trying to patch all the information to the SharePoint List. I prefer Patch over Form. 

 

One of the text input fields that is required I changed its "TextFormat" to "Number". I am now at the confirmation button and trying to Patch that field input with the other ones,but this particular one isnt working when i put in the code :

 

NumberOfTrainees: NumbOfTrain_Input.Text

For the Patch.

 

This is the full code for the patch:

 

Patch('Training Requests',Defaults('Training Requests'),
{Title: "Training Requests",
TrainingPOC: User().FullName,
MicrosoftEmail: EIDText_Input.Text,
DateRequested: Text(Today(), "[$-en-US] mmmm dd, yyyy"),
TrainingDeploymentDate: DatePicker1.SelectedDate,
TrainingMaterial: TrainingMText_Input.Text,
MaterialLink: MaterialLText_Input.Text,
Process: Dropdown1.Selected,
LOB: LOBText_Input.Text,
Region: Dropdown2.Selected,
ShiftSchedule: ShiftSText_Input.Text,
Comments: 'CommentBox_Confi.'.Text,
NumberOfTrainees: NumbOfTrain_Input.Text });
SubmitForm(Form2); UpdateContext({PopUp: true});

 

Text Input Field Name: NumbOfTrain_Input

SharePoint Column I am trying to Patch it to: NumberOfTrainees

 

I also tried to put:  NumberOfTrainees: NumbOfTrain_Input.Number

Thinking that since Ii changed its format to Number Instead of Text that that might solve it, but no luck.

 

Any help would be appreciated,

Thanks!

 

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    I believe your problem is the current code returns a Text data type whereas your SharePoint column is a number data type.

    NumberOfTrainees: NumbOfTrain_Input.Text

     

    To fix this problem you can use the VALUE function

    NumberOfTrainees: Value(NumbOfTrain_Input.Text)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaney  

     

    That worked like a charm!! Thank you so much! Really appreciate it.

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    Awesome, I am glad to have helped!

     

    Please Accept as Solution to indicate to others that the thread is closed.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard