Can any provide me details How can we do autosave in samrtforms.

  • 11 February 2016
  • 4 replies
  • 2 views

Badge +2

I have used number of tabs in form. Want to impliment autosave functionality when user navigating in between tabs. And also need to prompt user to save when navigatign away from form.


4 replies

Userlevel 3
Badge +8

Dear ,

 

Tabs are simply concerned as "controls" , so u need to go to ur form --> Edit 

Add a new rule which is as following 

 

11466i5B4172A0F49C802D.png

 

so , if u choose when tab1 is deselected :

(here u perform ur actions) auto save or anything u want .

 

Hope it helps!

Best Regards.

Badge +2

Dera Ahmad,

 

Thanks for the response. My main concern is how can we know whether data modified or not. is there any Out of the box feature availalble.  Each Tab having 30 text controls. Total 10 Tabs on Form.

 

Thanks,

Raji

Userlevel 3
Badge +8

Dear , 

 

one question tho , u will have a tab initiated with data right ? i assume u got data loaded on view/form initialize ,

either way , this out of a box is just my idea , and maybe someone else will have another idea

lets say u got 5 text controls , u need to create 5 data labels , and when u load the data (First time u load this tab) u will need to retrieve the data into ur text controls and on the data labels , in this way u willl have the initiated data in the data labels , and if the user modifies the text controls , u will be able to check if the initiated data in the data labels are different than current data in text controls = it means that user modified the data , 

and the way u can do the checking , u will need a pretty long expression inside datalabel flag , u will have something like this

if((textbox1 Not equals datalabel1) OR (textbox2 Not equals datalabel2) and so on......) , return 1 , else return 0 , to the flag data label .

after that on deselecting the tab , if the data label flag =1 ---> auto save , if flag =0 then do nothing ..

 

Note:if you don't do many smartobject method calls i recommend  you to update the data anyway , either it is modified or not .

 

I hope this helps ur scenario ,

Regards.

Badge +3

You could use a parameter Call it Tabname_Saved

 

and a control changes value rule set the parameter to false.

 

and when the tab is deselected and the parameter is not set to true, save the data, if it's still set to true don't save and so forth. 

 

 

Reply