How to add custom functionality to a form field

So there is a requirement where a Text field is to be made optional depending on whether a Boolean is checked or not. 


For example

there is a Boolean -GSTIN and a text field "GST Number"

the person should be able to fill GST Number(mandatory)  if he checks GSTIN else the field should be disabled/non mandatory.

  • Suggested Answer

    0  

    Hi @Anupam
    I dont believe this is possible without customisation .
    In the record type form , you can set the properties of a field including whether it is mandatory or not, but nothing to validate it against another field.
    In the Additional field properties you can set the max length, use a value from a lookup set, use an edit mask or use an external COM add In.

    Possibly there is a way that you can set both fields as Mandatory in the form, but if the boolean GSTIN  field is checked (true), the COm Add-In could detect that and supply a default value for the text field preventing the need to enter a value manually, but if unchecked the mandatory nature of the field in the form will force the value to be entered.
    I havent worked with COM AddIns, so this could be one resolution or another way through customisation, see the supplied CM...COMSDK.pdf, or reference Open Text Content Manager SDK Documentation (content-manager-sdk.github.io) and select teh relevant version of CM
    It may need assistance from OpenText support, and would be worth raising a ticket 

    BTW: IS there a reason you mentioned a text field , which handles up to 65k characters, instead of a string field for "GST Number" assuming that it cant be an actual  number field as you need to handle alpha characters ?  

  • 0 in reply to   

    Thank you for your assistance. No this was a simple example that I took.