For user experience it is often better to not let a user do something they can't instead of letting them know after the fact. One of these UX 'things' is field lengths. If a Synergy repository field is a D2 we should not let them enter 100 or if a string is A6 not let them enter 7 characters. In the browser we of course can control this with the maxlength attribute. Now we can set this attribute manually but that approach is brittle.
What would be ideal, in my opinion, is if when the repository structures are converted to Synergy.Net, a readonly field could be generated with that field's maximum length. That field could then be used on the client side to either set maxlength or perform a validation.
So for instance a field named Escp_mths_adv_collect is a D2. That is generated as:
private f_Escp_mths_adv_collect ,int
;;; <summary>
;;; EADV
;;; </summary>
public property Escp_mths_adv_collect ,int
method get
proc
mreturn f_Escp_mths_adv_collect
endmethod
method set
proc
if(f_Escp_mths_adv_collect != value)
begin
m_changed = true
f_Escp_mths_adv_collect = value
end
endmethod
endproperty
If another field like
public readonly int length_Escp_mths_adv_collect = 2;
were added it could be used client-side to perform validations,