Feb 13 2019 05:49 PM
Hello,
When I create a new list item and save it, I would like to keep the list form open instead of closing it. I then want to show additional fields and a button that will trigger a workflow. The workflow needs to know the list item ID, because it will write a status back into the list item.
I currently use a flow that is triggered when the item is created, but it can take up to five minutes for the flow to run. If I use a flow button in the custom form, it would run immediately. But I can't tell the flow button what the ID of the item is, unless it has been saved.
How can I keep the form open and the current item showing after a new item has been submitted?
I currently have
SharePointIntegration OnNew =Set(MyVar,"new"); NewForm(SharePointForm1)
SharePointIntegration OnEdit Set(MyVar,"edit"); EditForm(SharePointForm1)
SharePointForm1 OnSuccess =If(MyVar="edit",ResetForm(SharePointForm1); RequestHide(),Set(MyVar,"edit"))
SharePointForm1 Item =If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),SharePointForm1.LastSubmit,SharePointIntegration.Selected)
I have a label on the form that uses SharePointForm1.LastSubmit.Title. When I save a new item, that label shows the correct title, but the other fields in the form show a previously entered item, not the last one.
Ideas?
Feb 14 2019 11:03 AM
Feb 17 2019 04:25 PM
Thanks @Alan Marshall , I think I found another workaround that does not required editing after the new item is saved.
Feb 04 2021 10:35 AM
@Ingeborg Hawighorst I found out that you need to remove the "OnSuccess" field's default functions RequestHide and ResetForm. On top of this you need to update the "Item" field's default function from First("DataSource") to Last("DataSource"). This will ensure that the last saved item's values will remain instead of reverting to the first item's values. I'm not sure why it becomes blank or empty when saving even after changing the "OnSuccess" field to just be false (do nothing), but that is what happens. Hope this helps!