cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Patch text input

Hi! I want to update the excelfile with the updated values from the text input. How do I write the Patch formula correct? I tried with this but I'm not sure what I do wrong..

 

Patch(Booking, ThisItem.'Booking (Name)', {Januar: TextInput2.Text})

 
1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hi @Janni29 

The problem is likely in the second element of your patch statement.  The patch specifies three things, first, the dataset being patched, second, the record being patched, and third the Item in the record being patched.  ThisItem.'Booking (Name)' seems to be ambiguous.  It should reference a record in your dataset like Patch(Booking, Lookup(Booking, ID=Gallery1.Selected.ID),  {Januar: TextInput2.Text}).  The lookup should reference a unique value in the dataset like ID and a reference to the Control containing the selected record. 

 

View solution in original post

4 REPLIES 4
Super User II
Super User II

Hi @Janni29 

The problem is likely in the second element of your patch statement.  The patch specifies three things, first, the dataset being patched, second, the record being patched, and third the Item in the record being patched.  ThisItem.'Booking (Name)' seems to be ambiguous.  It should reference a record in your dataset like Patch(Booking, Lookup(Booking, ID=Gallery1.Selected.ID),  {Januar: TextInput2.Text}).  The lookup should reference a unique value in the dataset like ID and a reference to the Control containing the selected record. 

 

View solution in original post

Hi @Drrickryp

Thank you for your reply. I'm still not getting it right.. Is it correct to use the LookUp function like this?

 

Patch(Booking,LookUp(Booking, Name=Label6.Text),{Januar:TextInput2.Text})

 

 

Looks good.

Do you get an error message?

Maybe don't use the play-mode inside the power apps studio. Open the App on its own to get an error message.

Regular Visitor

I think I was mixing the fieldname and Source filename, had the same "names". It is working now. Thank you!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (48,339)