I have to process time spent by workers on the factory floor. we have such codes that relate to particular task with time stamp so we can get this time spent. Small thing needed is that certain codes are start of work codes and other group is end of work codes. but they must match
so that for example, REL is a start code and it must have only ECT as matching end code.
till now i didn't concern about this as you can see, now how would be best way to do this in a formula?
I don't think I can get them to have a table on the server to maintain this.
shared numbervar StTime:= StTime;
shared numbervar EdTime:= EdTime;
shared stringVar stTranCD :=stTranCD ;
shared stringVar edTranCD :=edTranCD ;
if ({EMPHISTL1.EMTRNC} in ['REL', 'EBC', 'EBV', 'EBA', 'BOM', 'BOO', 'BSB','SOB','BAS', 'PBS', 'PBA', 'BAC', 'BAM', 'BMM', 'BQC', 'PBM', 'PBT', 'BEA', 'BMT', 'BAT',
'OPA', 'OP9', 'BPA', 'BP9', 'CPA', 'CP9', 'CCB', 'MCB', 'SPP' ])
then
stTranCD:={EMPHISTL1.EMTRNC};
if ({EMPHISTL1.EMTRNC} in ['ECT','ECM','BOC','ECC','ECV','ECA','COM','COO','CSB','SOC','CAS', 'EPT', 'PCS'])
then
EdTime:= {EMPHISTL1.EMTRT};