The Power Apps Patch function can be used to create or update data.
Power Apps Patch function
For example, you can use the Power Apps Patch function to create a SharePoint list item. Or you could use Patch to update a record in SQL server.
This is quite easy and well documented on the Power Apps Patch function page.
When you look at using Patch to update an item, you might also want to consider using Update or UpdateIf.
Create an item with the Patch function
But what do you do if you now want to get the details of the item that you just created. It would be helpful if you could collect the data created without having to query your data source.
Today I discovered that the Power Apps Patch function returns the item created. So that means that I can set a variable.
This variable can then be used to get the ID of the list item.