Hello wonderful community!
First off, I’m not a developer, but I manage to get by. I’ve searched the forums, and have found similar posts, but the closest one did not provide any code examples.
https://community.plumsail.com/t/save-item-with-fd-save-then-post-flow-api-call/10773
I also found this article, but was unsure:
https://plumsail.com/docs/forms-sp/how-to/flow-edit-display.html
I am trying to solve an issue where the modified by is set to a system account because of a workflow that runs when a Sharepoint item is created or modified. The flow in question sets certain fields and more specifically takes the contents of the “notes” text field and prepends it to the existing field of “History” so that we record each time notes are entered. The flow runs under the context of a system account, so it sets the modified by as itself. That’s only an issue in this context when I use the completed button which calls another flow on top of the original one. The button flow just changes a couple of fields, but because it’s a button flow, I can use get user profile to identify who clicked the button. Unfortunately, the first flow runs async and so the prepended history note will not have the display name of the user that clicked the button, but the system account. WHEW!
What I’m trying to do is to have the completed button save the form first which will change the modified by to that current user, and THEN call the flow to mark everything complete. I think that will solve my issue. However, moving the fd.save above the call of the flow in the button click code will save the form, but doesn’t call the flow.
Can someone with a bigger brain help me to get this accomplished? I’ve tried attacking this from the flow standpoint and now from the forms standpoint.
Any help, or pointers in the right direction would be greatly appreciated!
Gary
Here is my current button code: