Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change field with Button

Status
Not open for further replies.

jurzyguy

Programmer
Jun 8, 2001
11
0
0
US
How can I permanently change a field in a document by clicking a button on the action bar. This has to be done on the web side, so only a formula or javascript will work. The formula FIELD firstName := "me" changes the field but does not make it permanent.
 
Hi,
If You change the field you only change the so called UI-Document (UserInterface). To make the change permanent you have to save the document by @Command([FileSave]). Now the document is saved to the so called backend-document and the change is permanent.
 
and i forgot: The document has to be in the edit-mode when you change the field-value
 
The code which I produced from what you said is:

@Command([EditDocument]);
FIELD ShowAsAltered := "No";
@Command([FileSave]);

This does not work though, when the button is clicked the broswer says the page cannot be displayed. If I remove the final line it works, but the document stays in edit mode and the user can edit any fields which is not good.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top