none
Run workflow when I open a documentset already create or force a refresh on the documentset welcome page. RRS feed

  • Question

  • Hi,

         I have edit the document set welcome page and add 2 list on it.

    One list with one column date and time format.

    In this column I put the date of the meeting.

    The second list is my meeting points.

    I use the webparts connection option to make a date filter between the 2 lists.

    So when I modify the date in the first webparts, all line with this date in the second wepparts come on the screen.

    With a workflow at the creation or at the modification of the document set, I could catch the document set properties and save the meeting date in variable.

    I use the variable to update the first list date record. 

    That's resolve a part of the issue, but not all the issue.

    Exemple:

    When I modify the date in the first webparts of the document set welcome page already open, the second weppart who are link do not refresh directly. I need to hit F5 to refresh the page of the document set to view the modification.

    I have try 2 things to resolve this problem.

    1. Activate the asynchrone ajax function for the auto update of the second webparts.

    I view the page blink like if the refresh will comes, but no change in the page.

    2. I have add a content editor webpart in the welcome page of the document set, in the html editor, I have put this code to force the refresh of the webpage each 15 seconds.

    <scripttype="text/javaScript">

    function refreshPage() {

        window.location = window.Location;

    }

    setTimeout(refreshPage, 15000);

    </script>

    The refresh start, but SharePoint doesn't find the page after the refresh.

    If I create a new document set, the workflow start and modify the date in the first list.

    Like it's a new document set, the page is automaticly refresh so the list #2 is empty if the date is not present or present the information if the date is find in the 2 list.

    My other trouble is than my workflow run if I create or modify a document set, but I dont find how I can force the workflow to run when I open a existing document set.

    Like the workflow doesn't work when I just open a document set, the last date push in the first list is not updated and the wrong information is present in the second list.

    Here is a screen shot of the document set welcome page. Yes this is in french.... :O)

     Any suggestion is welcome !

    Monday, November 18, 2019 2:07 PM

All replies

  • Hi Marc-Etienne,

    For refreshing the current page, use the JavaScript below:

    <script src="https://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
    
    <script type="text/javaScript">
    
    function timedRefresh(timeoutPeriod) {
    
    setTimeout("location.reload(true);",timeoutPeriod);
    
    }
    
    timedRefresh(15000);
    
    </script>


    As  for triggering workflow when document set opened, there is no OOB method to achieve, maybe you could start a workflow programmatically.

    Check the similar post for more information: Execute workflow when item is opened

    https://sharepoint.stackexchange.com/questions/46710/execute-workflow-when-item-is-opened

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, November 19, 2019 8:35 AM
    Moderator
  • Thank you Grace, I will test this new version of the javascript.

    Do you know if this is possible to connect this javascript on a WebParts ?

    The goal will be than when I modifie the date in my first WebParts list, the refresh of the page will be called.

    Wednesday, November 20, 2019 10:03 PM
  • Hi Marc-Etienne,

    There is no easy method to achieve your requirement. You can check the post below to get some clue by using code.

    Refresh a list webpart to reflect the item added in sharepoint 2010 developed using visual studio 2010

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, November 21, 2019 9:31 AM
    Moderator
  • Hi Marc-Etienne,

    I’m checking how the things are going on about this thread. Whether the post helps you?

    You can mark the post as answer if it helps.

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, November 25, 2019 2:06 AM
    Moderator