August 30, 201312 yr Hi ... I can't get to work what I think should be something very simple. Our users write large fields of text. Several times they've complained because they've lost an hour of typing (medical report) Filemaker connectivity has been lost. Usually a power outage or VPN issue. I've tried to get them use to clicking outside the field and then back into the field to commit the data but I continue to hear "Why can't it autosave? Just like Word" .... Well ... I created a timer script that gets launched by an OnObjectEntry trigger. It then waits 60 seconds and then gets the cursor position using get(ActiveSelectionStart), does a set field to itself and then positions the cursor using the Set Selection. This works fantastic when typing a new entry and the cursor is at the end. Problem is when you try and edit the text in the middle of the text, the save kicks in and the next character is "selected". This causes the character to disappear when the user carries on typing. Is there no function to simply position the cursor?
September 4, 201312 yr Author Sure ... Set Variable [$position; Value:Get(ActiveSelectionStart)] if[$$timerField = "MyField"] Set Field [file::MyField; file::MyField] Commit Records/Requests[] Set Selection [file::MyField; End Position: $position; End Position: $position] end If
September 4, 201312 yr Though we can help you with your script, it would be my thought to fix the actual problem and not create a work around. I think their would be several things that can be done to remedy this. what are your settings under preferences / memory ? is save record changes automatically checked or not? I would like to know how they are loosing connection, if you are running a server, you should have ups's on all your server and network equipment. including individuals desktops.
September 4, 201312 yr Try to set ONLY the start position: Set Selection [file::MyField; Start Position: $position]
September 4, 201312 yr Author Though we can help you with your script, it would be my thought to fix the actual problem and not create a work around. I think their would be several things that can be done to remedy this. what are your settings under preferences / memory ? is save record changes automatically checked or not? I would like to know how they are loosing connection, if you are running a server, you should have ups's on all your server and network equipment. including individuals desktops. Thanks ... we have all that covered, our end does not fail. The Internet for the user actually disconnects ... crappy location. Could also be an array of other situations. The fields they are typing in involve long and drawn out reports that amount to over an hours work. The crux of this thread is the ability to position the cursor into the middle of existing text.
September 4, 201312 yr Author Solution Try to set ONLY the start position: Set Selection [file::MyField; Start Position: $position] Thanks Ray .... I swear I tried that ... but guess not as it works. Maybe it was just the end position I tried.
September 4, 201312 yr Thanks Ray .... Ray would be a natural assumption, but his name is Daniele Raybaudi. Lee
Create an account or sign in to comment