Hello,
I'm just about doing my first PowerApp, watched the videoes and read some documentation, but seemly I'm not able to get a proper result.
For my first test, I'm connected tp an excel table on oneDrive, I made an app out of the data and this works fine. Now I try to add a button that feeds a field with a value. I tried with:
Update( Tabelle2, { Stamp: 0 } )
on the onSelect property. The table's name is Tabelle, the field is stamp. Can someone tell me what the correct syntax would be?
Thank you!
Solved! Go to Solution.
Hi @Manuel_O
Yes, it is correct to use a semi-colon instead of a comma when you run PowerApps in German.
Here is something that I posted earlier this week that explains this behaviour.
The update fx updates a whole record in the table and expect the old record, then the new record (old to update)
UpdateIf can modify value(s) in record(s)
Examples: https://docs.microsoft.com/en-us/powerapps/functions/function-update-updateif
Hi @Manuel_O
It looks like you're trying to update an existing record in your Excel spreadsheet.
With PowerApps, there are a few functions that can carry. The two main ones are Update and Patch. Update replaces an entire record in a table, whereas Patch updates one or more values in a record and the other values alone. In both cases, we need to specify the record to update and this is the bit that's missing in your formula.
Assuming that you added a gallery control called BrowseGallery1 that shows records from Tabelle2, the formula to update the currently selected record would be:
Patch( Tabelle2, BrowseGallery1.Selected, { Stamp: 0 } )
Thank you!
I changed it to:
Patch( Tabelle2, DetailForm1.Selected, { Stamp: 0 } )
to fit the controls name (DetailForm1)..but it still does not work: ("Expected:: ParenClose; Found: Error" says fhe warning sign).
Hi @Manuel_O
DetailForm1 is the control that displays a single record, so unlike the gallery control, it doesn't have a Selected property.
To find the record that you're updating, I recommend that you look at the properties of DetailForm1. The Item property defines the record that the detail form shows. This is the value that you should provide as the second argument to the Patch function.
"BrowseGallery1.Selected" seems to be correct, following your tips. But I still get errors:
It seems to work when I use semicolons instead of commas:
Patch( Tabelle2; BrowseGallery1.Selected; { Stamp: 0 } )
Hi @Manuel_O
Yes, it is correct to use a semi-colon instead of a comma when you run PowerApps in German.
Here is something that I posted earlier this week that explains this behaviour.
Thanks, I did not know this. Even the code examples in the german(!) documentation are with commas and therefore don't work here.
Good to know! Thank you all for the help!
You're welcome! I'm glad I could be of help.
User | Count |
---|---|
262 | |
110 | |
92 | |
55 | |
41 |