Hammerton Posted February 7, 2011 Posted February 7, 2011 Have a long script. I would like to change every line to set a field as 2 instead of 1. Is there a way to do this without clicking the specify button 50 times?
Russell Barlow Posted February 7, 2011 Posted February 7, 2011 Have a long script. I would like to change every line to set a field as 2 instead of 1. Is there a way to do this without clicking the specify button 50 times? Update your profile with your OS and the version of FM your using.
comment Posted February 7, 2011 Posted February 7, 2011 Is there a way to do this without clicking the specify button 50 times? Maybe - if you are running under OS X. But I believe it would take more time and effort to set it up than clicking the specify button 50 times. I would suggest you re-examine your script, as it sounds some optimizing would be in order.
bruceR Posted February 7, 2011 Posted February 7, 2011 Have a long script. I would like to change every line to set a field as 2 instead of 1. Is there a way to do this without clicking the specify button 50 times? It will be hard the first time; but once you've done this you can set a variable at the top and Set variable [ $x; 1] Set Field[ this; $x] Set field[ that; $x] Set field [ other; $x] etc. But what kind of script is it that you are setting so many fields to the same value? That seems very unusual and suggests there may be something else worth looking at.
Hammerton Posted February 8, 2011 Author Posted February 8, 2011 Thanks for the help. the variable value idea is clever. I will use that in the future whenever I build a big script with something repeated many times. The script takes a database full of student quiz scores that are related to individual students record in my grade book. The quiz records can pertain to one of 15 different chapters and there can be multiple quiz attempts for each chapter. The script finds and sorts related records and resets each chapter quiz score in my grade book to be the highest quiz score found for that chapter. Once that is done it sets any quiz with a score of 80 or above to 2. So there were actually only 15 corrections I had to make. But I nevertheless found it frustrating that you can't text-edit a script manually. Thanks again
bruceR Posted February 8, 2011 Posted February 8, 2011 Thanks for the help. the variable value idea is clever. I will use that in the future whenever I build a big script with something repeated many times. The script takes a database full of student quiz scores that are related to individual students record in my grade book. The quiz records can pertain to one of 15 different chapters and there can be multiple quiz attempts for each chapter. The script finds and sorts related records and resets each chapter quiz score in my grade book to be the highest quiz score found for that chapter. Once that is done it sets any quiz with a score of 80 or above to 2. So there were actually only 15 corrections I had to make. But I nevertheless found it frustrating that you can't text-edit a script manually. Thanks again Related records; record set. Hm. Do you know about the replace command? It operates on an entire record set and can use a static value or calculated value. Are you walking through the records? I don't think you really need to do what you think you need to do. Please post a copy of your file or a copy of your script.
comment Posted February 8, 2011 Posted February 8, 2011 The script finds and sorts related records and resets each chapter quiz score in my grade book to be the highest quiz score found for that chapter. Once that is done it sets any quiz with a score of 80 or above to 2. Why replace existing data, instead of using calculations?
Recommended Posts
This topic is 5038 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