How to get field's data blank when created a new record in form

Hi all,

I did add a few fields on a form, and “Site” is the field in one of them.
When I try to create a new record in the form, it’s using the previously used data automatically instead of getting blank.

I need the data on that field is to be blank initially until a user add some data in that field

Note: The Edt of field “Site” is a String

Thanks in advance

We may be just guessing how your form works unless you give us more details.

If the Site field is bound to a data source, it means that you haven’t created a new record of the data source. You said you try to do so, but not how, so I can’t tell you what you’re doing wrong.

I did use 3 data sources named StageSalesHeader, StageSalesLines, and InventDim. And here the site, warehouse, and batch number are taken from the InventDimata source.

The form is to maintain data between Customer and Inventory
Here is the scenario:
If a customer has purchased an item, the details need to be entered in the form. So when I try to enter a new record for that customer, the data for the warehouse and batch number are blank, whereas Site is not blank.

I did try by using the Init method on the InventDim data source and the form Init method. But not a successful result

OK, that’s the problem. As you already found experimentally, your assumption that init() method creates a new record is wrong. init() used to initialize the data source (e.g. adding extra query ranges) when opening the form.

The method creating a new record is create().

You may want to check InventDim.RecId field to see if you got a new record or an existing one.