Skip to main content
15-Moonstone
October 20, 2021
Solved

Reset to default value only when all the fields are filled

  • October 20, 2021
  • 2 replies
  • 1463 views

Hi all,

I have a form, which has 2 text box and 2 drop downs for entering the data. When I click on save button my data gets saved into an datatable and all the fields gets reset to default value. I have also added few checks for missing fields, but when any field is empty my all the entered data get reset to default value. I want to hold this data if any field in empty and reset only when the all the fields are filled. How this can be achieved?

 

 

Thank you!!

Best answer by PaiChung

I probably would validate all inputs and use those returns into an expression the expression then triggers the save and the save service on complete triggers the field reset

if the expression evaluates to 'not everything filled in' I would trigger a status message informing the user of missing inputs. or you can use the validators for that so it is specifically tied to the input.

2 replies

PaiChung22-Sapphire IAnswer
22-Sapphire I
October 21, 2021

I probably would validate all inputs and use those returns into an expression the expression then triggers the save and the save service on complete triggers the field reset

if the expression evaluates to 'not everything filled in' I would trigger a status message informing the user of missing inputs. or you can use the validators for that so it is specifically tied to the input.

Community Manager
October 28, 2021

Hi @MM_9023322.

 

In addition to @PaiChung's response, the ThingWorx Help Center provides more details around the Validator function.

 

Regards.

 

--Sharon