The SysAgentTask table in our DB only has one row in it (and it’s not related to this report), but Ice.Systask DOES have a record for each time I generate an SO Pick List report. And I can link that table to Ice.SysTaskParam to get the Order List, which would theoretically link the task to the OrderHed records I want to update UserChar1 on. I wrote the following script in a standard data directive on Ice.SysTask:
foreach (var ttSysTaskRow in ttSysTask.Where(ttSysTaskRow => ttSysTaskRow.TaskDescription == “SO Pick List”))
{
foreach (var SysTaskParam_iterator in Db.SysTaskParam.Where(SysTaskParam_Row=> SysTaskParam_Row.SysTaskNum == ttSysTaskRow.SysTaskNum && SysTaskParam_Row.ParamName == “OrderList”))
{
foreach (var OrderHed_iterator in Db.OrderHed.Where(OrderHed_row=>SysTaskParam_iterator.ParamCharacter.Contains(OrderHed_row.OrderNum.ToString())))
{
OrderHed_iterator.UserDate1 = DateTime.Today;
}
}
}
This does not return any errors, but it also does not update the UserDate1 field. I’m not really surprised, since most of my syntax is guesswork. Does anyone see any screwups in my code?
Also, I noticed that for Standard directives the “Execute Custom Code” has a “With Rule” setting, which lets me choose between “Once passing all matching rows” or “once passing all existing rows.” I left it on the default setting (all matching rows) because I don’t really get what it does.