I am really struggling with a utility which displays varying pieces of information across multiple forms/screens, navigated dependent on user selection.
My objective is to have a new item or modified item trigger a workflow.
During my trial and development, I have been able to update a sharepoint entry by using the formsubmit command. But I would have to do that for each page of the form it seams. when what I REALLY want to be able to do, is
a) collect data from the forms/screens into a collection
b) submit the new item or updated item as a single "event" which triggers the workflow(s)
I have managed to create my collection (colItem), and extracted data into it.
I can differentiate between a new and existing item based on the presence of an ID (First(colItem).ID)
But, what I am currently able to do is:
1) Identify the matching sharepoint record, based on the ID (struggling with syntax)
2) update or Patch the submitted changes from my collection into my list
Code I have tried:
If(IsEmpty(colItem.UID),"true",Patch('Sys Inventory AW',First(Filter('Sys Inventory AW',ID=First(colItem).UID))))
If(IsEmpty(colItem.UID),"true",Update('Sys Inventory AW',Filter('Sys Inventory AW',ID=First(colItem.UID)),First(colItem)))
Where colItem is my collection
UID is the item ID in my collection
Sys Inventory AW is my sharepoint list
ID is the item ID in sharepoint
I think I'm am on the right track (I hope) but I am REALLY struggling with the syntax.
I am also wondering if I am referring to the collection correctly. But that is another issue for another day!