AnsweredAssumed Answered

Script breaks down

Question asked by flxbrown on Feb 12, 2014
Latest reply on Feb 13, 2014 by flxbrown

Title

Script breaks down

Post

     Hi,

     I'm having a problem with a basic script to insert a value in a field based on an evaluation of two other field. The script I've written looks like this:

     Case ( 

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot≤ 3; "1" ; 

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot = 4; "A" ;

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot≤ 7 ; "2";

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot = 8; "B" ;

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot≤ 11 ; "3";

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot = 12; "C" ;

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot≤ 15 ; "4";

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot = 16; "D" ;

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot≤ 19 ; "5";

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot = 20; "E" ;

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot≤ 23 ; "6";

     Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot = 24; "F" ;

     "" )

     Pretty straight forward. Right now it breaks down after 16 records and returns "1" from record 17 onwards (i.e. the first two records of Dimmer Schedule::Rack Type = 48 and Dimmer Schedule::Slot≤ 11 ; "3"; are captured, then it stops.) It does - rightly - not return any value to records that are not Rack Type = 48

     Right now I'm testing it with only importing 144 records, with 48 matching the Rack Type = 48 criteria.

     I've tried running the script as a auto enter calculation and as a set field script after import. Same result.

     Any ideas? What obvious things have I missed?

      

     Thanks!

      

     Felix

Outcomes