Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4102 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

 

post-72145-0-19171600-1377741034_thumb.j

 

I have a fairly simple script (Just a bunch of If... Else if...).  It works well.

post-72145-0-09150000-1377741071_thumb.j

post-72145-0-55341900-1377741079_thumb.j

 

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

Posted

It seems like an Exit Script (0) prevents the problem.

 

Question: "Why?"
 

Posted

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.

Posted

post-72145-0-78333400-1377756893_thumb.j

post-72145-0-18829300-1377756905_thumb.j

post-72145-0-56557800-1377756915_thumb.j

post-72145-0-66086400-1377756924_thumb.j

 

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

Posted

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.

Posted

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

Posted

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.

  • Like 1
Posted

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.

This topic is 4102 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.