August 29, 201312 yr I am using FM 12 04 advanced. I have a Membership application. This script and problem revolves around two tables:  Members -->>DES  DES is represented by a portal on Members.   I have a fairly simple script (Just a bunch of If... Else if...). It works well.  The problem is that after my script ends (I can watch it in debug), the record pointer jumps to another record (most of the time... but not always).  I have added a Commit Record. No help. I have removed the Commit Record. No help. I have removed the Goto Object command and ... 'No help'....  Has anyone any idea why this happens? Looks pretty straight forward and yet it happens... I am stuck and perplexed.  Thanks for considering this.  Ron
August 29, 201312 yr Is this subscript? Is it trigger fired? Exit Script [0] says to not proceed, same as false would. So your script, as it is, is proceeding to the next field, next portal row, whatever. Exit Script 0 stops it. Regular behaviour AFAIK but it can be confusing. So we would need to see whole script to know why it is acting like it is but it is wanting to proceed to a main script I think. Showing part of a script never works, Ron.
August 29, 201312 yr Author  Ok. Here is the script. I think that most of it is irrelevant to the cause of the problem. But, since I obviously don't get what is causing the problem, I must admit the reason 'could' be where I don't think it should be.  Thanks for your help.  Ron
August 30, 201312 yr on a field in the portal or on the parent? The exit[0] basically cancels the exit so the cursor stays in the field. Without it the focus would go to whatever is next in the tab order, which may be a field in the next record. So check your tab order and disable anything that is not needed there.
August 30, 201312 yr Author on a field in the portal or on the parent? The exit[0] basically cancels the exit so the cursor stays in the field. Without it the focus would go to whatever is next in the tab order, which may be a field in the next record. So check your tab order and disable anything that is not needed there. The script fires on Exit from a date field in the PORTAL. But, the cursor jumps randomly (so it seems) to another record on the PARENT. So far Exit(0) seems to cure the problem. I just don't understand why FM is jumping at the end of the END IF at the end of the script. It doesn't do that at the end of other scripts??? Perplexed... Ron
August 30, 201312 yr Here's the thing though: FM does not randomly jump to another record. You're making it do it. What you are getting caught up in is all the implicit behavior that FM does trying to anticipate what it is you are trying to do. Clearly it does not anticipate correctly in this case but that's not really FM's fault but rather the result of you not taking explicit control of what should happen. I realize this sounds harsher than it should but that is the crux of it and that is the learning curve that you need to get through. Can't really help you with the issue at hand without having a copy of the file and being able to step through the scenarios with script debugger enabled and inspecting all the layout elements / tab orders etc.
August 30, 201312 yr Author Here's the thing though: FM does not randomly jump to another record. You're making it do it. What you are getting caught up in is all the implicit behavior that FM does trying to anticipate what it is you are trying to do. Clearly it does not anticipate correctly in this case but that's not really FM's fault but rather the result of you not taking explicit control of what should happen. I realize this sounds harsher than it should but that is the crux of it and that is the learning curve that you need to get through. Can't really help you with the issue at hand without having a copy of the file and being able to step through the scenarios with script debugger enabled and inspecting all the layout elements / tab orders etc. Turns out a couple of things were going on: 1) I used the wrong object name to put the focus on the portal. 2) I needed to 'get' the fact that setting the sort order in the portal only affects the 'appearance' of the data. I needed to set the sort order at the relationship level. You are right. Everything FM does is 99% caused by something I coded or setup. So, I am, with the help of people like you, slowly climbing the 'learning ladder'. Thanks for your help and comments.
Create an account or sign in to comment