I know this topic seems very common, but I cannot find an answer for my case.
I have a form for user to input and edit fields, but I need to force them to press a button to save it and inform their supervisor (send a a mail) rather than they just click the cross to close and save without their supervisor get knowing.
So I make use of SaveOptions, and set with default value of “0”, so it will only set to “1” and get saved when they click a button. If they just click the cross tab, they simply leave the form without getting any prompt message for save. (ie. Force them to use the button to save)
MyButton Click:
@SetField(“SaveOptions”; “1”);
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow])
I simply set the SaveOptions to Computed Type or Computed for Display with default “0”, so that each time the user open the form, it’s value is “0” and can only change to “1” through pressing the button. It works fine on client but the document will not save on web.
But when I try to change the type to Editable Type, it works on web but I need to do extra steps to set it back to “0” every time on loading.
I have enabled the checkbox of “Generate HTML for all fields” under form properties and I really can see SaveOptions on original code. (I know you will simply ask me if I haven’t told…)
Anyone could hep me, I really wanna get rid of the problem before Christmas!
It seems that I have met such problem before but I forgot to ask here…
In the Input Validation event …add the code as pasted below.
FIELD SaveOptions := @Unavailable
When the form gets loaded every time … the field will be created …and the default valu set automatically …you 'll not have to populate the value (0) , every time the form loads.
Subject: RE: Computed Fields behave strange on web
I have tried your method by removing the line@SetField(“SaveOptions”; “1”);
My Button Click:
FIELD SaveOptions := @Unavailable ;
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow])
It works on web now, but I cannot save the doc on client, it seems that the document tries to save without seeing the line of removing SaveOptions, which still sees its value “0”.
Subject: RE: Computed Fields behave strange on web
Siddhartha1,I have tried exactly your coding but still it can’t save on client but can do on web.
I just wonder if anyone had ever experienced problem for computed type fields on web, it seems to me that we usually have to take another longer route to achieve something through a normal path, may be I am new to Notes…