Hi, I am working on different work-around to do upsert to database.
Here are some I found:
Update data:
ForAll(
Gallery2.AllItems,
Patch(
POWERAPP_REASON_DEMO,
LookUp(
POWERAPP_REASON_DEMO,
ID = BI_ID
),
{ID: BI_ID},
{Reason: Dropdown_reason.Selected.Value}
)
)
Insert data(which is not working because it shows error when the records already exist in database)
ForAll(
Gallery2.AllItems,
Patch(
POWERAPP_REASON_DEMO,
Defaults(POWERAPP_REASON_DEMO),
{ID: BI_ID},
{Reason: Dropdown_reason.Selected.Value}
)
)
Please let me know if any idea to do the upsert
(if the records already exist --> update,
if the records are not there --> insert)