Preventing a workflow from repeating once a field has been filled in?












2















I currently have a list in SharePoint Online where project requests are logged and approved. Essentially, a list item (a project request) will go through a series of approvals by different people, and once the final approver reviews the request, a project number is added to a 'Project Number' field to mark its completion.



Until all people have approved, this project number field is left blank. It's only when it's filled in at the end that an email is fired off to the original requester to notify them.



I have set up a very basic workflow that runs every time a list item is changed. It simply fires off the email if the project number field is equal to 'not empty'.



enter image description here



This workflow works great when the project number is first entered. However, if a user then modifies another list item field after the project number is entered, this workflow is triggered again, resulting in the email being sent again.



I need a solution where, if the email is sent, this workflow will not run again.



I attempted something like below where a variable is used to try and end the workflow if the project number is entered. However, since the entire workflow is triggered every time a list item is changed, the variable just gets reset over and over and the same issue persists.



enter image description here



If anyone is able to help that would be great!










share|improve this question



























    2















    I currently have a list in SharePoint Online where project requests are logged and approved. Essentially, a list item (a project request) will go through a series of approvals by different people, and once the final approver reviews the request, a project number is added to a 'Project Number' field to mark its completion.



    Until all people have approved, this project number field is left blank. It's only when it's filled in at the end that an email is fired off to the original requester to notify them.



    I have set up a very basic workflow that runs every time a list item is changed. It simply fires off the email if the project number field is equal to 'not empty'.



    enter image description here



    This workflow works great when the project number is first entered. However, if a user then modifies another list item field after the project number is entered, this workflow is triggered again, resulting in the email being sent again.



    I need a solution where, if the email is sent, this workflow will not run again.



    I attempted something like below where a variable is used to try and end the workflow if the project number is entered. However, since the entire workflow is triggered every time a list item is changed, the variable just gets reset over and over and the same issue persists.



    enter image description here



    If anyone is able to help that would be great!










    share|improve this question

























      2












      2








      2








      I currently have a list in SharePoint Online where project requests are logged and approved. Essentially, a list item (a project request) will go through a series of approvals by different people, and once the final approver reviews the request, a project number is added to a 'Project Number' field to mark its completion.



      Until all people have approved, this project number field is left blank. It's only when it's filled in at the end that an email is fired off to the original requester to notify them.



      I have set up a very basic workflow that runs every time a list item is changed. It simply fires off the email if the project number field is equal to 'not empty'.



      enter image description here



      This workflow works great when the project number is first entered. However, if a user then modifies another list item field after the project number is entered, this workflow is triggered again, resulting in the email being sent again.



      I need a solution where, if the email is sent, this workflow will not run again.



      I attempted something like below where a variable is used to try and end the workflow if the project number is entered. However, since the entire workflow is triggered every time a list item is changed, the variable just gets reset over and over and the same issue persists.



      enter image description here



      If anyone is able to help that would be great!










      share|improve this question














      I currently have a list in SharePoint Online where project requests are logged and approved. Essentially, a list item (a project request) will go through a series of approvals by different people, and once the final approver reviews the request, a project number is added to a 'Project Number' field to mark its completion.



      Until all people have approved, this project number field is left blank. It's only when it's filled in at the end that an email is fired off to the original requester to notify them.



      I have set up a very basic workflow that runs every time a list item is changed. It simply fires off the email if the project number field is equal to 'not empty'.



      enter image description here



      This workflow works great when the project number is first entered. However, if a user then modifies another list item field after the project number is entered, this workflow is triggered again, resulting in the email being sent again.



      I need a solution where, if the email is sent, this workflow will not run again.



      I attempted something like below where a variable is used to try and end the workflow if the project number is entered. However, since the entire workflow is triggered every time a list item is changed, the variable just gets reset over and over and the same issue persists.



      enter image description here



      If anyone is able to help that would be great!







      sharepoint-online list workflow designer-workflow






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 13 hours ago









      TobyToby

      403




      403






















          2 Answers
          2






          active

          oldest

          votes


















          3














          Create system column like "WFdone" - number - default 0 (you can hide it in forms[new,edit,view] with powershell) example here



          At the start of workflow check IF WFdone = 1




          • IF NO - continue in workflow

          • IF YES - end workflow


          You will set this WFdone to 1 after sending email before you will end workflow.



          Hope it helps!






          share|improve this answer
























          • Aha, that's a great idea, thank you!

            – Toby
            12 hours ago











          • You're welcome.

            – Zdeněk Vinduška
            12 hours ago



















          0














          If you're using SP Online/O365, try building your workflow on Flow - it's much more robust in built-in features and dynamic fields, and more capable for building customizations.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "232"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f257706%2fpreventing-a-workflow-from-repeating-once-a-field-has-been-filled-in%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            Create system column like "WFdone" - number - default 0 (you can hide it in forms[new,edit,view] with powershell) example here



            At the start of workflow check IF WFdone = 1




            • IF NO - continue in workflow

            • IF YES - end workflow


            You will set this WFdone to 1 after sending email before you will end workflow.



            Hope it helps!






            share|improve this answer
























            • Aha, that's a great idea, thank you!

              – Toby
              12 hours ago











            • You're welcome.

              – Zdeněk Vinduška
              12 hours ago
















            3














            Create system column like "WFdone" - number - default 0 (you can hide it in forms[new,edit,view] with powershell) example here



            At the start of workflow check IF WFdone = 1




            • IF NO - continue in workflow

            • IF YES - end workflow


            You will set this WFdone to 1 after sending email before you will end workflow.



            Hope it helps!






            share|improve this answer
























            • Aha, that's a great idea, thank you!

              – Toby
              12 hours ago











            • You're welcome.

              – Zdeněk Vinduška
              12 hours ago














            3












            3








            3







            Create system column like "WFdone" - number - default 0 (you can hide it in forms[new,edit,view] with powershell) example here



            At the start of workflow check IF WFdone = 1




            • IF NO - continue in workflow

            • IF YES - end workflow


            You will set this WFdone to 1 after sending email before you will end workflow.



            Hope it helps!






            share|improve this answer













            Create system column like "WFdone" - number - default 0 (you can hide it in forms[new,edit,view] with powershell) example here



            At the start of workflow check IF WFdone = 1




            • IF NO - continue in workflow

            • IF YES - end workflow


            You will set this WFdone to 1 after sending email before you will end workflow.



            Hope it helps!







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 12 hours ago









            Zdeněk VinduškaZdeněk Vinduška

            2,1281520




            2,1281520













            • Aha, that's a great idea, thank you!

              – Toby
              12 hours ago











            • You're welcome.

              – Zdeněk Vinduška
              12 hours ago



















            • Aha, that's a great idea, thank you!

              – Toby
              12 hours ago











            • You're welcome.

              – Zdeněk Vinduška
              12 hours ago

















            Aha, that's a great idea, thank you!

            – Toby
            12 hours ago





            Aha, that's a great idea, thank you!

            – Toby
            12 hours ago













            You're welcome.

            – Zdeněk Vinduška
            12 hours ago





            You're welcome.

            – Zdeněk Vinduška
            12 hours ago













            0














            If you're using SP Online/O365, try building your workflow on Flow - it's much more robust in built-in features and dynamic fields, and more capable for building customizations.






            share|improve this answer




























              0














              If you're using SP Online/O365, try building your workflow on Flow - it's much more robust in built-in features and dynamic fields, and more capable for building customizations.






              share|improve this answer


























                0












                0








                0







                If you're using SP Online/O365, try building your workflow on Flow - it's much more robust in built-in features and dynamic fields, and more capable for building customizations.






                share|improve this answer













                If you're using SP Online/O365, try building your workflow on Flow - it's much more robust in built-in features and dynamic fields, and more capable for building customizations.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 5 hours ago









                KRobisonKRobison

                1466




                1466






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to SharePoint Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f257706%2fpreventing-a-workflow-from-repeating-once-a-field-has-been-filled-in%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Paul Cézanne

                    UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

                    Angular material date-picker (MatDatepicker) auto completes the date on focus out