cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pegger
Helper I
Helper I

Patch a Text Input to SharePoint

I have an app in which I need a user to enter a number into a text input.  After entering the number, I need that number to be patched to a specific field within my SharePoint list.  I have tried using the Patch function, but I get an error that says it is expecting a Text type and it is patching a Record type.  I do not know how to solve for this.  Guidance is appreciated!

 

Patch(Sharepoint_List,

    First(Filter(SharePoint_List,ID='ID_Dropdown'.Selected.ID)),

        { 'User_Entry':

            {Value: TextInput1.Text,

            '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}

    });

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

If its just a number field then the syntax for the patch should be something like this

Patch(SharePoint_List, Lookup(SharePoint_List,ID='ID_Dropdown'.Selected.ID, {'Usesr_Entry': Value(TextInput1.Text)})

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

What kind of field are you trying to patch the entry to?  It doesn't look like you are patching a standard text or number field.  What data type is the SharePoint column?  If you can provide that information I'll try to help with the appropriate syntax.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Pegger
Helper I
Helper I

The field is a Number with no decimals.  Though, I have other ones that I set to text or multi-line text and I can't get either to work!  I would prefer a number I believe.  Ultimately, I want the number to get formatted after entry on the Power App screen so if someone enters 5000 it shows as 5,000. 

 

Also, when someone logs back in and opens the App and navigates to their ID, it would be able to pull the value from SharePoint to show it in the text input.  I don't know if that is possible though in a text input control as I may need to use a separate Label for pulling the value.

 

Thanks for helping me!

Pstork1
Dual Super User III
Dual Super User III

If its just a number field then the syntax for the patch should be something like this

Patch(SharePoint_List, Lookup(SharePoint_List,ID='ID_Dropdown'.Selected.ID, {'Usesr_Entry': Value(TextInput1.Text)})

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Pegger
Helper I
Helper I

@Pstork1  - That worked!  Thank you!

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (63,854)