Testeur1
25th May 2023, 10:44
Hello everyone,
I can't change the value of an "enum" field.
I want to change a value (tcibd200.osys) which is a list field on several items at the same time.

In the list there is :
- "SIC"
- "Planned"
- "Manual"

Currently many are in "SIC" and I want to change them all to "Planned". I would like to do this by using the position in the list, so 2, rather than putting its textual value "Planned".

I've done several tests:
- tcibd200.osys = 2 ==> type error
- tcibd200.osys = "2" ==> type error

Could you please help me.

Thanks

mark_h
25th May 2023, 16:01
Search the forum for enum and ltoe. So I think ltoe(2) might work - assuming 2 is right value for planned. I mean I typically used the enum like tcyesno.yes or tcyesno.no. So you should be able to see what enum is being used and say tcibd200.osys = tcosys.planned (do use this you need the actual enum and I do not know it).

OmeLuuk
25th May 2023, 16:21
tcibd200.ocys uses domain tcosys with constants:
tcosys.sic (1) = "SIC"
tcosys.mps (2) = "Planned"
tcosys.fas (3) = "FAS"
tcosys.mnl (4) = "Manual"

So like @mark_h stated: tcibd200.ocys = ltoe(2) or tcibd200.ocys = tcosys.mps should work.