The type of a field in the table is EDT with multiple array elements, I can't make these fields non-editable in the form

The type of a field in the table is EDT with multiple array elements. This field is used on the form so user sees as if there was multiple different fields. I want to make these fields non-editable but it seems the only way to do it is to disable the allowEdit on the whole DataSource. But the problem is that I also want to leave 2 fields editable on this DataSource. Is this even possible?

So let’s say the name of the field in the table is ‘field’. There are 7 of them: Field[1], field[2], … field[3].

I tried disabling it like this: MyTable_DS.object(fieldNum(MyTable, field)).allowEdit(false); but only field[1] is disabled.
I can’t access the other 6 fields at all. When I type field[1] AX doesn’t know what I’m trying to do…

I also tried to disable them on the form, I turned on AutoDeclaration but it’s impossible to access these fields by typing field[1] or field[2], etc. So is there any other way to do this? Do you think it is possible at all?

You have to use fieldId2Ext() to get the field number including array index. For example:

FieldId f = fieldId2Ext(fieldNum(MyTable, field), 2);