Hi Niklas :)
Possible Cause
The Power Apps form is likely using SharePointIntegration.Selected as its default behavior. This means that when the app opens, it is selecting the first item in the list instead of creating a new one.
Solution: Force the Form to Open in New Item Mode
To ensure the form always creates a new item instead of editing an existing one, follow these steps:
1. Modify the Item Property of the Form
Update the Item property of your form to check if an ID parameter is provided. If not, force a new form creation:
If(
IsBlank(Param("ID")),
Defaults(YourSharePointList),
LookUp(YourSharePointList, ID = Value(Param("ID")))
)
✔ Explanation:
If no ID is passed, it creates a new item using Defaults(YourSharePointList).
If an ID is passed, it looks up the corresponding record.
2. Use NewForm() on App Start
In the OnStart or OnVisible property of your screen, force the form to always open in New mode:
If(
IsBlank(Param("ID")),
NewForm(YourForm)
)
This ensures that even if the app defaults to the first item, it will switch to creating a new item.
3. https://apps.powerapps.com/play/providers/Microsoft.PowerApps/apps/<APP_ID>?Mode=New
Then, modify your form logic to check for this parameter:
If(
Param("Mode") = "New",
NewForm(YourForm)
)