Ended up C# coding as found in the forum below, credit to them:
using (var txScope = IceContext.CreateDefaultTransactionScope())
{
foreach(var UD01 in (from row in Db.UD01 select row))
{
Db.UD01.Delete(UD01);
}
Db.Validate();
txScope.Complete();
}
/* Find current record in dataset */
using (var txScope = IceContext.CreateDefaultTransactionScope())
{
foreach (var recOrderHed in (from row in Db.OrderHed where row.OpenOrder == true select row))
{
/* Find all lines for Order */
foreach (var recOrdDetail in (from row in Db.OrderDtl where row.Company == Session.CompanyID && row.OrderNum == recOrderHed.OrderNum && row.OpenLine == true select row))
{
foreach (var recOrdRel in (from row in Db.OrderRel where row.Company == Session.CompanyID && row.OrderNum == recOrdDetail.OrderNum && row.OrderLine == recOrdDetail.OrderLine && row.OpenRelease == true select row))
{
/* Update UD Record */
UD01 newRow = new UD01();
Db.UD01.Insert(newRow);
newRow.Company = Session.CompanyID;
newRow.Key1 = recOrdDetail.OrderNum.ToString();
newRow.Key2 = recOrdDetail.OrderLine.ToString();
newRow.Key3 = Guid.NewGuid().ToString();
newRow.ShortChar01 = "Example";
newRow.Number01 = recOrdRel.OrderNum;
newRow.Number02 = recOrdRel.OrderLine;
newRow.Number03 = recOrdRel.OrderRelNum;
newRow.Date01 = recOrdRel.ReqDate;
}
}
}
Db.Validate();
txScope.Complete();
}
New Goals:
I need to be able to detect when a user invokes the UpdateEXT with a row mod of “D” for the first time each day. This should then toggle the bpm to run deleting the old data out of the UD01 table and writing the new. Additionally, I would like a toggle that triggers four hours after that would engage that toggle again. I figure this can be done using a function and would like someones help standing one up.