February 2, 200620 yr I have a table Submittal Reportings, using portals I am pulling all the material needed for a construction job with their corresponding required delivery dates. What I need to do is be able to move all the dates (for this particular job) back by a selected number of weeks. I have a script that creates the new date in a field called NewReqDate, and it almost works. The problem I am facing is that it will updated all of the related records except for the last one. So it looks like my exit loop if statement isnt working right, but im not sure why not. Here is the script: Go to related records [show only related records; from table: “Submittal Data”; Using layout: “Submittal Data” (Submittal Data)] Loop IF [submittal Data::Req_date<1/1/1900] Omit Record Else Set field [submittal data::NewReqDate; Submittal Data::Req_date+((Submittal Reportings::DelayInWeeks*7)] Go to Record/Request/Page [Next] Exit Loop If [submittal Data::NewReqDate>Submittal Data::Req_Date] End If End Loop Goto Layout [“Submittal Reportings” (Submittal Reportings)] Clear [select; Submittal Reportings::DelayInWeeks] any ideas?
February 2, 200620 yr In the record that is not being updated, is NewReqDate a later date than Req_Date? If so, perhaps its prior to 1900? If neither applies, I would wonder if the record that is not being updated is actually being found by your calculation.
February 2, 200620 yr Author The date will never be before 1/1/1900, I just put that there to eliminate the records that have no date in that field. The Record is found, after the script is ran when I go into submittal data, that record is actually the one being displayed. I can scroll thru the records and find all of the correct related records that are indeed modified, but that one is not. Very strange
Create an account or sign in to comment