List item record lock

Forums Classic DFFS List item record lock

Viewing 6 reply threads
  • Author
    Posts
    • #35279
      Jonathan Stamper
      Participant

      Do you know of any way to create some sort of record lock on an item in the event that multiple users not update the same things.

      Scenario: When a request comes in admins can assign themselves as a single lead to that request. Sometimes another admin may come behind and also add themselves causing an overwrite to what the original admin had assigned to them.

      I wasn’t sure if you had any ideas or done anything similar.

    • #35281
      Alexander Bautz
      Keymaster

      You can use the Check out list items functionality in the Misc tab in EditForm.

      Alexander

    • #35284
      Jonathan Stamper
      Participant

      Ah, ok I’ll take a look into that thanks for letting me know.

      • #35289
        SteveE
        Participant

        I like the checkout feature, but one word of caution is if you have a Flow running on it you’ll need to consider how they play together.

      • #35291
        Jonathan Stamper
        Participant

        That is really cool! I didn’t know that existed. Fortunately, I’m not using any workflows at the moment but I’m sure I will have to transition to them in the future with SP Online. What sort of hinderances are you referring when using Flow?

      • #35293
        SteveE
        Participant

        Just that you need to account that when it moves to “Checked Out” that is considered an update to the item so if you have something triggered on “When an item is modified” it will activate the workflow. You can add a qualifier – something like “If Checked Out is not equal to true” but you’ll have to play around with it. In Flow, you can put it in the very first step of the trigger under Settings/Trigger Conditions. It has an odd syntax – something like “@not(equals(triggerBody()?[‘CheckedOut’],true))”.

    • #35308
      Jonathan Stamper
      Participant

      Got it! That makes sense. Thanks for sharing.

      I’m running into a separate issue in that the CheckedOut field will sometimes not switch back to No thus putting items in an infinite “checked out by…” even though no one is in it. Any ideas on what I could do to fix that? I was thinking of just setting the checkedOut = No on save or cancel.

      • #35313
        Jonathan Stamper
        Participant

        Oh, I should have read the directions better. I didn’t set the default to No. Should be fixed now.

    • #35358
      Jonathan Stamper
      Participant

      So it appears that I’m still having issues where at least 1-3 times a day the Checked Out field will not flip back to No when a user submits or cancels out of a list item.

      Are there any additional things I can try and/or test out that may assist?

      • #35362
        Alexander Bautz
        Keymaster

        Which version of DFFS are you using in this form?

        Alexander

    • #35366
      Jonathan Stamper
      Participant

      I’m using the v4.4.5.38 but I just remembered there was a newer version out there.

    • #35370
      Alexander Bautz
      Keymaster

      The new version does not change anything related to this functionality.

      I’m not sure exactly what could be wrong when the user submits and it is still checked out – could it be that they have manually checked the “Keep the form checked out” button?

      Regarding the cancelling out of a form after it is checked out:
      This might be a weak point because the code has to catch the navigation away from the form and run a function to toggle the CheckedOut to false. If you close the browser or use the browser navigation buttons to go back it does not catch it – only click on the Cancel button will check it back in.

      The problem is that it is not possible to run custom code in window.onbeforeunload so I’m not sure I have any other solution than possibly using a FLOW to auto-check in items after some time of it being checked out (if it has not been checked back in while the FLOW was waiting to trigger), but I haven’t thought that completely trough so keep in mind that users might have a form open over time or possibly have checked the “Keep the form checked out”.

      Alexander

      • #35418
        Jonathan Stamper
        Participant

        Yeah, it’s still doing it after trying out other things. I’ve hidden the option from the user to keep it checked out on close so it wouldn’t be that causing the issue. I ended up creating a “CheckOut” data sheet list view only accessible by our team to handle any items checked out that shouldn’t be. That’s the only other thing I can think of at this stage. I tried a workflow in SP Designer (still on on-premise) and that tended to create a lot of conflict errors with users so I turned that off.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.