Both are possible, but keep in mind that auto-assign rules against the Item field will be executed whenever something is entered in the Item field, which may (or may not) have an impact on the performance.
To use auto-assign, add the following function to the VBScript
Function HasKeyword(Fi, keyw, CaseSpecific) dim myFi, CompareMethod
HasKeyword=0 if CaseSpecific=true then CompareMethod=1 else CompareMethod=0 myFi=trim(Fi & "") if instr(1,myFi,keyw,CompareMethod)>0 then HasKeyword=true End Function
And in the Item field, add the following to the Auto-assign:
AM:Pending=HasKeyword(Item,"Lmsg",true)
(add or modify to the item field will check pending if item has "Lmsg". If you want to clear Pending when the item is erased, Add the E flat (i.e. AME:...))
Comments
dim myFi, CompareMethod
HasKeyword=0
if CaseSpecific=true then CompareMethod=1 else CompareMethod=0
myFi=trim(Fi & "")
if instr(1,myFi,keyw,CompareMethod)>0 then HasKeyword=true
End Function