
Hello,
I'm trying to update a record from a child table, but when I update a column, it creates a new record with a new ID and with the modified column, instead of updating the existing record
ForAll(Filter(Gallery_Issues.AllItems,Toggle_Issues.Value = true), Patch(CL_ISSUE,LookUp(CL_ISSUE,CL_PROD_SUMMARY_ID = Value(TI_ProdID.Text) && CL_ISSUE_ID = Value(TI_IssueID.Text) ,{ISSUE_COMMENTS:TI_Comments.Text})))
Can you help, please?
Thanks
Hi @moumen192 ,
Brackets in the wrong places I think
ForAll(
Filter(
Gallery_Issues.AllItems,
Toggle_Issues.Value
) As aPatch,
Patch(
CL_ISSUE,
LookUp(
CL_ISSUE,
CL_PROD_SUMMARY_ID = Value(aPatch.TI_ProdID.Text) &&
CL_ISSUE_ID = Value(aPatch.TI_IssueID.Text)
),
{ISSUE_COMMENTS: aPatch.TI_Comments.Text}
)
)
also you can see if this is any faster
Patch(
CL_ISSUE,
ForAll(
Filter(
Gallery_Issues.AllItems,
Toggle_Issues.Value
) As aPatch,
With(
{
wID:
LookUp(
CL_ISSUE,
CL_PROD_SUMMARY_ID = Value(aPatch.TI_ProdID.Text) &&
CL_ISSUE_ID = Value(aPatch.TI_IssueID.Text)
).ID
},
{
ID: wID,
ISSUE_COMMENTS: aPatch.TI_Comments.Text
}
)
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps