[FM Weetbicks] Best of 2021 #5 - Idle Record Release

Hi all,

The final technique in our best of 2021 series sees a nice way to silently commit idle users who have left a record in an uncommitted state. This is great for situations where a user locking a record has the potential to impact other users (or developers).

You can check out the article & example file technique here

Thank you for reading and supporting FileMaker Weetbicks in 2021 and we look forward to bringing you more content in 2022 - Merry Christmas!

3 Likes

Another nice piece of work @weetbicks. Idle record release is something that I'd like FileMaker to handle natively but I don't want to hold my breath until that day arrives.

1 Like

Two questions about your code:

  1. I see you name some of your calculation variables with a leading tilde, e.g. ~rep Any reason for this?
  2. These lines intrigue me:
~rep = Code(Get(WindowName))
$$Activity[~rep] = ...

It looks like you are taking the name of the window, and converting that to an integer, and then using a repeating field $$Activity[] to store the data for that specific window.

Is this safe, however? If the Window name is long, then you'll end up with a ridiculously long integer:

My assumption would be that $$Activity[ a very long integer] would lead to out of memory errors as FileMaker attempts to allocate a gigantic array. Perhaps that's not what FileMaker does for repeating fields or variables?

FileMaker doesn’t manage the array in the way that you have imagined. It does not try to create a trillion empty places before populating the final place.

3 Likes

I posted a new topic: Repeating Fields and Variables - Behavior and Limitations