Dear community, when I open the list item in edit mode and click on create item icon in SharePoint list item, an item should get created in another list with same values some of them are choice, multiline text, lookup and person field. Is it possible to use patch function here to create new item and update if item already exists? Many thanks.
Solved! Go to Solution.
I think I should use power automate to create item if it doesn't exist and modify if exists.
Simply Used powerautomate to create item if doesn't exist. Else updating if exists.
You can use the OnSuccess property of the form to do the patch. However you have to have a field in the second list that matches the ID of the current list. So if there is a field in list2 that is ParentID, then
If(IsBlank(LookUp(List2,parentID=Form1.LastSubmit.ID),
Patch(yoursecondlist, Defaults(yoursecondlist),{parentID:Form1.LastSubmit.ID
field1:Form1.LastSubmit.Field1,
field2:Form1.LastSubmit.Field2,...}),
Patch(yoursecondlist,parentID=Form1.LastSubmit.ID,{field1:Form1.LastSubmit.Field1,
field2:Form1.LastSubmit.Field2,...}),
There are lot of errors I get in this formula after replacing actual list names and field names. Seems This is a pseudo code.
I think I should use power automate to create item if it doesn't exist and modify if exists.
Simply Used powerautomate to create item if doesn't exist. Else updating if exists.
User | Count |
---|---|
260 | |
110 | |
89 | |
53 | |
44 |