Attrs Class
- Last UpdatedNov 06, 2025
- 1 minute read
The Attrs class contains methods for retrieving and setting various attributes within the MES system.
The following is an example script stub (not a full functioning script) to interact with attributes
dimbAddasboolean;
' works for any object whether it is a lot or not (e.g. job_attr)'
' dim oAttr as aaFactMES.aaAttrs.attrValue;
' this does not validate me.cmdLotAttr = false;
' aaFactMES.aaAttrs.GetAttrValue(attrName, tableName, filterField, filterValue, filterField1, filterValue1 );
result= aaFactMES.aaAttrs.GetAttrValue( "Vendor Lot ID", "lot_attr", "item_id", me.receiveItem, "lot_no", me.moveRollId);
LogMessage( "result success = '" + result.success+ "' and value = '" + result.Value.Val+"' edited at '" + result.Value.LastEdit+ "'");
' result.Value is of type aaFactMES.aaAttrs.attrValue. Since this cannot be dimensioned in IAS, just reference directly
' if the attribute is not associated to the lot yet, the value will be null and must be added, otherwise, it is updated.
ifresult.Value.Val== NULLthen
bAdd= true; elsebAdd= false; endif;
'aaFactMES.aaAttrs.SetAttrValue( attrName, attrVal, lastEdit, modId, tableName, filterField, filterValue, filterField1, filterValue1, bAdd );
' allowed one more filter
ifneededresult= aaFactMES.aaAttrs.SetAttrValue( "Vendor Lot ID", "value", null, null, "lot_attr", "item_id", me.receiveItem, "lot_no", me.moveRollId, bAdd);
System.Object
FactMES.Client.Common.Attrs