MultiTerm: TermField ReadOnly Property

Is it possible to set a field to ReadOnly?

I create a definition field, I can with a bit of trickery, set the import/export definition to ReadOnly.

So for example, if I have a TERM_UUID field, how can I make the field itself ReadOnly, so that the value cannot be changed by the end user?

I am using the SDK to view the TermFields:

               Entries oEntries = oTb.Entries;
                Entry oEntry = oEntries.Item(1);
                EntryIndexes oIndexes = oEntry.Content.EntryIndexes;
                EntryIndex oIndex = oIndexes[0];
                Console.WriteLine(oIndex.Term);
                Console.WriteLine("Number of term-level descriptive fields: " + oIndex.TermFields.Count.ToString());
                for (int i = 0; i < oIndex.TermFields.Count; i++)
                {
                    Console.WriteLine(oIndex.TermFields["i"].Name + " " + oIndex.TermFields["i"].ReadOnly);
                }

This results in:

asdasd
Number of term-level descriptive fields: 1
TERM_UUID False

But I cannot set: TermField["i"].ReadOnly = True

Logically, if the TermField has a ReadOnly property == "False", then surely one should be able to change it to "True", either programmatically or set it to "True" by default? 

Kind regards

Samuel

Parents Reply
  • Hi,

    I have investigated your issue and you can set the read only property in the following way:


    1) Open Multiterm interface ->Termbase Manangement-> Input Models (depending on the entry level, language)
    2) Set a term field (example in the below picture: field Note)


    3) Field settings are displayed in the right side of the field
    4) Select Read-only
    5) Press Next button
    6) Save the settings from the buton displayed in the Termbase Actions

    7) Press Full Form button when using the saved template (the Full form is applying all those rules defined in the Input Models wizard).
    8) You can also edit the FileName.xdm file generated after you save the settings (find details in the bellow print screen). You can change the value of the <Readonly> field through 0 or 1 (0 is False) and (1 is True)

     

     

    With kind regards,

    Florentina-Lucia Caputa

Children