Normal Topic @FormFieldValue causes a GOTO (Read 1120 times)
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
@FormFieldValue causes a GOTO
Apr 10th, 2004 at 6:26pm
Print Post Print Post  
Why does the following @FormFieldValue code cause focus to navigate to the field I am only trying to retreive a value from? (This is in a table view subform.)

Code
Select All
If Notes="" and @FormFieldValue("Transactions Form", "System ID", 1)<>"" then
     Notes = @userselect( @XListValues(@fn,"DBS Notes Form!Notes") )

 


Shouldn't it just be returning a value without actually relocating me to that subfield?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @FormFieldValue causes a GOTO
Reply #1 - Apr 10th, 2004 at 7:30pm
Print Post Print Post  
It doesn't have to take you to the field - but it does have to take you to the record, which ends up taking you to a field in that record. It has to take you to a record to be consistent with the behavior in form view subforms - wherein the data isn't on the client unless you are on the form. By "going" to a record in a form - you are asking the server to send the data for that form. By leaving it, you are sending the data back to the server (a "commit"). The table view does not change this behavior, other than "painting" the data all at once at the beginning. But when you move from row to to row in a table, your client is communicating with the server (even "standalone"). The data itself is always on the server - not the client.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @FormFieldValue causes a GOTO
Reply #2 - Apr 11th, 2004 at 4:44am
Print Post Print Post  
I had this code in the "Notes :: On Element Entry" event of a subform.

The problem I had with this is that if I entered the 2nd line of that subform, and moved to the Notes element, I ended up in an endless loop with the highlight flashing between the Notes elements of line 1 and line 2, and eventually crashing Sesame after a few seconds.

Is there a way programming could be temporarily deactivated while @FormFieldValue is performing it's visit to the other record?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @FormFieldValue causes a GOTO
Reply #3 - Apr 11th, 2004 at 1:03pm
Print Post Print Post  
Quote:
Is there a way programming could be temporarily deactivated while @FormFieldValue is performing it's visit to the other record?


Yes. I'll look into it.


  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @FormFieldValue causes a GOTO
Reply #4 - Apr 12th, 2004 at 6:24pm
Print Post Print Post  
I've set it so the event programming is temporarily disabled while the FormFieldValue calls take place. It'll have to get through testing, but otherwise will be in the next release.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @FormFieldValue causes a GOTO
Reply #5 - Apr 13th, 2004 at 4:44am
Print Post Print Post  
Excellent! Thank you, Mark.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged