Use of empy field condition

Use of empy field condition

I have generate 2 forms
(1) Form-1   : 3 fields
(2) Stateless form

Data will be entered in stateless form. Total 6 fields generated in stateless form. A customized button also generated. A deluge script attached with this button (On click). Script is such that it will add first 3 fields of stateless form as a first record in Form-1 and another 3 fields of stateless form as second record in Form-1.

But If I keep fill only first 3 records in stateless form, keeping another 3 fields empty, deluge script does not work. Very obvious.

I want to add if condition in that deluge script.

If first 3 fields in stateless form are filled (Which I will make mandatory by condition if one of 3 is filled) then only one record will be added to Form-1. Because another 3 fields in stateless form are empty.

What will be the deluge script?