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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write formula for ....

Status
Not open for further replies.

sc11pio

Technical User
Jul 10, 2003
20
SG
Hi,

I need help on the following:

I'd created an action button call "Mark as Closed". When I click on "Mark as Closed" button, the field STATUS should change to "Closed" instead of "Open".

Appreciate if anyone can help. =)

Reg,
Pio
 
Put this code in your button :

Code:
FIELD Status:="Closed"
@command([filesave]);
@command([fileclosewindow])

Pascal.
 
Pascal,

How can I just change the value without saving/exiting from the document?

Let me explain wat's my button actually for,

When I click on the button, it will prompt me to send the form. If I click Yes to send, the field "FORM SENT?" should mark as "Yes"

Below is a portion of my coding:
------------------------------------------------------
result := @Prompt([YESNO]; "Send form?"; "Would you like to send the ?");

@If (result = 1; @MailSend(To; ""; ""; Subject; ""; FormBody); @Prompt([OK]; "Cancel"; "No form send."));
------------------------------------------------------

How can i insert the coding on the above?
 
I think we have a workflow issue here. What is done to a document is virtual until the document is saved. Why change the status of a document if you do not save ? One crash, or one ESC key later and the change is gone.
As a developer, I would not like to have to send out a workflow notice on a document for which the status is not certain.
Nevertheless, if you change the value of a field via formula, the change should show up immediately.
As for inserting code, I see no problem with doing this :

Code:
FIELD Status:="Closed";
@command([filesave]);
result := @Prompt([YESNO]; "Send form?"; "Would you like to send the ?");
@If (result = 1; @MailSend(To; ""; ""; Subject; ""; FormBody);"");
@command([fileclosewindow])

Now, does this do what you want ?

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top