ScottSut Posted August 30, 2013 Posted August 30, 2013 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?
Raybaudi Posted August 30, 2013 Posted August 30, 2013 Could you write here your Set Selection script step ?
ScottSut Posted September 4, 2013 Author Posted September 4, 2013 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
No_access Posted September 4, 2013 Posted September 4, 2013 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.
Raybaudi Posted September 4, 2013 Posted September 4, 2013 Try to set ONLY the start position: Set Selection [file::MyField; Start Position: $position]
ScottSut Posted September 4, 2013 Author Posted September 4, 2013 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.
ScottSut Posted September 4, 2013 Author Posted September 4, 2013 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.
Lee Smith Posted September 4, 2013 Posted September 4, 2013 Thanks Ray .... Ray would be a natural assumption, but his name is Daniele Raybaudi. Lee
Recommended Posts
This topic is 4370 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now