Hi,
I'm trying to update specific records in the app I've added the following formula to the OnSelect property of the save button but this isn't working. The requested operation is invalid Server Response: A value but be provided for item. im a trying to filter on the GUID which isn't displayed in the Selected Gallery.
Patch(Table1,First(Filter(Table1, GUID = Gallery2.Selected.GUID)),{Title: DataCardValue6}),{First_x0020_Name:DataCardValue4},{Last_x0020_Name: DataCardValue5},{Age: DataCardValue2},{Email:DataCardValue3},{Address:DataCardValue1},{MobileNo:
I also need to set two additional fields when the save button is clicked which is a modified on and by these are hidden on the form but utilising the UpdateContact({ModifiedOn: Now()}) doesn't set the form field or write back to the data source as expected.
Seb
Solved! Go to Solution.
Hi @sebgedge ,
There is something wrong with your formulas. You should use 'Title: DataCardValue6.Text ' to call the value you enter. The same goes for the other fields. '{field: value, field2: value2}' represents one record with two fields, so you have these field in one set of braces.
If you also want to save the 'ModifiedOn' field, you can put it into the formula directly. So the formula should be modified as below:
Patch(Table1,First(Filter(Table1, GUID = Gallery2.Selected.GUID)),{Title: DataCardValue6.Text, First_x0020_Name:DataCardValue4.Text, Last_x0020_Name: DataCardValue5.Text , Age: DataCardValue2.Text, Email:DataCardValue3.Text, Address:DataCardValue1.Text, ModifiedOn: Now()})
Best regards,
Sik
Hi @sebgedge ,
There is something wrong with your formulas. You should use 'Title: DataCardValue6.Text ' to call the value you enter. The same goes for the other fields. '{field: value, field2: value2}' represents one record with two fields, so you have these field in one set of braces.
If you also want to save the 'ModifiedOn' field, you can put it into the formula directly. So the formula should be modified as below:
Patch(Table1,First(Filter(Table1, GUID = Gallery2.Selected.GUID)),{Title: DataCardValue6.Text, First_x0020_Name:DataCardValue4.Text, Last_x0020_Name: DataCardValue5.Text , Age: DataCardValue2.Text, Email:DataCardValue3.Text, Address:DataCardValue1.Text, ModifiedOn: Now()})
Best regards,
Sik
Thanks for the help 🙂 worked perfectly
Seb
User | Count |
---|---|
160 | |
91 | |
68 | |
64 | |
63 |
User | Count |
---|---|
210 | |
157 | |
93 | |
81 | |
71 |