14
Views
3
Comments
How to reset Forms in mobile development ?
Question
Platform Version
11.9.0.21103

Hello Outsystems Community,  

Firstly i am working on Outsystems 11 platform, i have created a small application within which i have to add an employee data, 

So for adding employee data i have created a form(called Add Employee)  and saving it in a 'emp' entity, 

PROBLEM:

 Now after using it and saving new data, when again i re-open 'Add employee' form it shows me previous employee's saved data , so i want that whenever i open 'Add Employee' form it should not have any pre-entered values 

Example You can see below whichever field i had filled before are being pre-entered , so i want this should not happen and all the fields should be empty and clear to fill 

Rank: #70

Hi DS,


You will need to assign the values of the inputs to its null value (the texts to "", the dates to NullDate(), etc.).

Being that said, you can do one of two things depending on the situation:

  • If you have the form on the same screen as the opening of the AddEmployee form: you can clear the inputs on the client action that triggers the opening of  the form.
  • If the form is on a block: you will need to force the refresh of the block by changing one of its parameters. One common strategy for this scenarios is to create a parameter Refresh of type Integer and increment it every time to trigger the OnParametersChanged so you can reset the values.


Hope it helps.


Regards,
DS

Rank: #95

Hello DS,

Can you share your OML so we can take a better look?


Kind regards,

Rui Barradas

Rank: #2331

Hi DS ,

you have to add refresh in the end of the logic when u click save , and assign it to null