maska Posted February 20, 2002 Share Posted February 20, 2002 Hi, I have a script which loops through all the portals and inserts a calcultated result if the rel files date = todays date. When performing, it will not get off the first portal and go to the next, however if I replace the "insert cal result" with say "set field" or anything else it will work. Can anyone please help me out with this. The script is: code: Go to Portal Row (first) Loop If("RelFile:date = Today") Here is the problem, why? - Insert Calculated Result... End If Go to Portal Row (exit after last, next) End Loop. The "If" is fine so it must be the "Insert Cal", but why, Any ideas? Thanks in advance for any help. Link to comment Share on other sites More sharing options...
danjacoby Posted February 20, 2002 Share Posted February 20, 2002 Two suggestions: Rather than "Today", use "Status(CurrentDate)" or (or maybe "and")... Go to the related file and perform the script directly on the records there (you might have to perform a find first). Link to comment Share on other sites More sharing options...
andygaunt Posted February 20, 2002 Share Posted February 20, 2002 You could add a calculation field in the related file. If(Date = Status(CurrentDate),"This text","Some other text") Downside is would need to be unstored. Saves a lot of loop scripting. Especially if multi user and someone is editing that related record. Link to comment Share on other sites More sharing options...
danjacoby Posted February 20, 2002 Share Posted February 20, 2002 Wait a minute! You're saying that using the "Set Field" command works ... um ... well ... why not just use the "Set Field" command? It's more stable anyway, and just as flexible. I like simple solutions, I do. Link to comment Share on other sites More sharing options...
Fitch Posted February 20, 2002 Share Posted February 20, 2002 When more than one portal is on a layout, it's a good idea to use Go to Field(a field::in the target portal) before Go to Portal Row () Link to comment Share on other sites More sharing options...
Chuck Posted February 20, 2002 Share Posted February 20, 2002 Is the field that the Insert Calculated Result is trying to insert data into on the layout? It needs to be. Set Field doesn't have this restriction. Chuck Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 8093 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