I need a way to show in the list view that a PA Flow is going to run. (This is to prevent the user from editing the record and to know if there is a problem with the WF))
BACKGROUND
- This is on a Classic SharePoint site.
- I am using Content Editor web parts to add CSS and JavaScript to my pages
- Trigger Type: When list item is Created or Modified.
- Stopping WF from triggering itself: I created a list field called WFStop. When the WF updates the triggering record it sets the WFStop field value to what the saved version number will be. When the WF triggers itself the first thing it does is see if the WFStop and Version numbers are the same. If yes, the WF terminates.
My thoughts on the solution.
- In the list view I display both the WFStop and Version fields.
- I have a multi-line rich text field: WFStatus set to: <div ID="WFStatus" >Checking...</div>
Use javascript? to check if WFStop = Version.
True: Replace the text in WFStatus DIV with "Ready"
False: Replace the text in WFStatus DIV with "Pending"
How do I write the javascript (or other code) to accomplish this?
Samples are greatly appreciated!