How to prevent overwriting data when using stateless forms to add data to larger form

How to prevent overwriting data when using stateless forms to add data to larger form

I have 2 stateless forms that populate a report. For the second stateless form, want to prevent users from re-entering data and overwriting the existing data.

I have a look up field that locates the record and the user enters the additional data on the stateless form which is input into the master form.

How do I write a deluge script on submission to:

-only transfer the data if certain fields are null
- if fields are not null cancel submit and show alert

I tried to write multiple if/else scripts but couldn't get it to work.