Custom data type and column precision and scale

Hi

I create custom data type form money format. How can I set precision and scale
for this column. When I choose my custom data type in studio fields precision and scale are hiding.

obraz

Have a look at the attached project. An an assumption for currency is that you want 2 decimal places and the most suitable datatype is BigDecimal. This is defined in the class CurrencyDatatype. On Screen, the format mask is applied on the fields without having to specify precision and scale again. The example below shows a fieldgroup currency field and a CurrencyField
261018Currency
Currency.zip (80.7 KB)

1 Like

ok. Thanks for your answer. I also add tag sqlType to metadate.xml like below

<datatype id="Currency"
              class="com.company.currency.entity.CurrencyDatatype"
	sqlType="decimal(19,2)"/>
</datatypes>