Action Button Code Works in R6 not R5

I have a action bar button which processes the code below. The database was designed in a 6.5 client, and the code works when a R6 client presses the button.

When the database is opened by a R5 client, only the SetField for the Status field works. Although the user gets the prompts, the answers to the prompts are not stored in the document or in the mailsend.

Any ideas?

FIELD Status :=Status;

FIELD Value :=Value;

FIELD NetworkUserid :=NetworkUserid;

FIELD NetworkPassword :=NetworkPassword;

FIELD TelephoneExtn :=TelephoneExtn;

FIELD NotesPassword :=NotesPassword;

FIELD DateCompleted :=DateCompleted;

@Do(

@SetField(“Status”;“Completed”);

@SetField(“DateCompleted”;@Today);

Value:=@Prompt([OkCancelEdit]; “Network Userid”; “Please Enter The Network Userid Allocated (If Applicable):”;“”);

@SetField(“NetworkUserid”; Value);

Value:=@Prompt([OkCancelEdit]; “Network Password”; “Please Enter The Network Password Allocated (If Applicable):”;“”);

@SetField(“NetworkPassword”; Value);

Value:=@Prompt([OkCancelEdit]; “Telephone Extn”; “Please Enter The Telephone Extn Allocated (If Applicable):”;“”);

@SetField(“TelephoneExtn”; Value);

Value:=@Prompt([OkCancelEdit]; “Notes Password”; “Please Enter The Notes Password Allocated (If Applicable):”;“”);

@SetField(“NotesPassword”; Value);

@MailSend(RequestedBy;“”;“”;“The PC/Network Request Form Has Actioned By IT”;“Please select the doclink below to take you to the request.” + @NewLine + @NewLine + "Network Userid Allocated (if requested): " + NetworkUserid + @NewLine + "Network Password Allocated (if requested): " + NetworkPassword + @NewLine + “Telephone Extension Allocated (If requested): " + TelephoneExtn + @NewLine + “Notes Password Allocated (if requested): " + NotesPassword + @NewLine + @NewLine;””;[IncludeDoclink]);

@PostedCommand([FileSave]);

@PostedCommand([FileCloseWindow])

)

Subject: Action Button Code Works in R6 not R5

You are reassigning the value of “Value”. This is only allowed in R6 not R5. You will need to recode it so that you only assign a value to a variable ONCE.

Hope this helps

Rob

Subject: And you are making it way to complicated w/ the @Do and @SetField’s

FIELD Status := “Completed”;FIELD NetworkUserid :=@Prompt([OkCancelEdit]; “Network Userid”; “Please Enter The Network Userid Allocated (If Applicable):”;“”);

FIELD NetworkPassword := @Prompt([OkCancelEdit]; “Network Password”; “Please Enter The Network Password Allocated (If Applicable):”;“”);

FIELD TelephoneExtn := @Prompt([OkCancelEdit]; “Telephone Extn”; “Please Enter The Telephone Extn Allocated (If Applicable):”;“”);

FIELD NotesPassword := @Prompt([OkCancelEdit]; “Notes Password”; “Please Enter The Notes Password Allocated (If Applicable):”;“”);

FIELD DateCompleted := @Today;

@MailSend(RequestedBy;“”;“”;“The PC/Network Request Form Has Actioned By IT”;“Please select the doclink below to take you to the request.” + @NewLine + @NewLine + "Network Userid Allocated (if requested): " + NetworkUserid + @NewLine + "Network Password Allocated (if requested): " + NetworkPassword + @NewLine + “Telephone Extension Allocated (If requested): " + TelephoneExtn + @NewLine + “Notes Password Allocated (if requested): " + NotesPassword + @NewLine + @NewLine;””;[IncludeDoclink]);

@PostedCommand([FileSave]);

@PostedCommand([FileCloseWindow])