We have one inbound interface with a field named "year". The inbound interface (IB) is already in production. We recently received a client requirement to remove the "#,###" format from this field in the template.
To avoid changing the data type of "year" Integer to a String, which would remove the formatting but alter the data type, I added a custom field in the IB as a string named "year" and deleted the original field. However, now I need to write this new field into the database.
Although the new field is accessible in the transformer and I can write validation rules for it, the year value is being written as null in the database.
can anyone please provide solution, I am adding images please check. I appreciate your help.
4o
@javamk - Instead of changing the interface fields, you can provide a template file for each interface. On the "Overview" tab, there is a place to reference a sample file using the "SampleFile URL".
Here you can reference a template file and for your example, you would remove the (#,###) from the Year header. Upload your sample file to the location of "module_name/web/public" and reference the template file within the SampleFile URL. See the screenshot below for an example.
@javamk - As we discussed, I am currently investigating if there is an easier way than changing the interface to suppress the format label during template generation.
For the example you provided above, the Custom attribute that you added needs to be used to derive the Year attribute on the model. This can be done by adding the Year attribute from your model to the list of "Derived fields" on the "Processor" tab. Once added, you can write logic within your transformer class to set the model Year attribute, which will be written to the database during file processing.