RobinReumers Posted September 8, 2009 Posted September 8, 2009 I currently have 3 tabs: Contacts, Quotes, Tasks and when I put a script trigger on Quotes and I put it on OnObjectModify, everything I hit another tab, it will start spinning and crash, as if it's in an internal look. If I just run the script, everything is fine, the script looks like this: Go to Field [invoice Total] Go to Portal Row [select;Find] Loop Set Field [sales Orders;...] Go to Portal Row [Next; Exit after last] End Loop Go to Field [select/perform;Address_Street] I don't see anything wrong here, any reason why this would get into a continuing loop?
RobinReumers Posted September 8, 2009 Author Posted September 8, 2009 Hm that's weird, I did update my version on the forum to FM 10, but I'll try to do that again then.
comment Posted September 8, 2009 Posted September 8, 2009 (edited) It's hard to tell what exactly your script does. However, you should be aware that a script trigger is attached to the entire tab control object - and if the script goes to another tab, it triggers itself again. It would probably be better to have the script operate directly on the data in its own table/s, and leave the portals and tab controls for the users. Edited September 8, 2009 by Guest
RobinReumers Posted September 8, 2009 Author Posted September 8, 2009 Exactly, that's the problem. I didn't know that. Because I'm going to a certain field in the previous tab, it will try to stay there. Is there a way to check which tab is being clicked in the script?
comment Posted September 8, 2009 Posted September 8, 2009 Sort of - see: http://fmforums.com/forum/showtopic.php?tid/200703/
RobinReumers Posted September 8, 2009 Author Posted September 8, 2009 That works perfectly, thank you very much.
Recommended Posts
This topic is 5829 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