Reputation: 113
I am having an issue with a button which lets the user selecet a number of values and assings them to a field, then sends an email with the values inserted. However, the values of the field repeat themselves.
I have a box that selects the number of errors:
FIELD ERRNO := @Prompt([OkCancelList]; "Number of Errors"; "Please select the number of errors."; "Number of Errors";"1":"2":"3":"4");
And then an @If function that, based on the number you selected previously bring up sucessive numbers of boxs to selct the errors:
@If(ERRNO="1";FIELD ERROR := @Prompt([OkCancelList]; "Select An Error"; "Error No. 1"; "Error";
"Duplicate Submission. " :
"Invalid Customer Number. " :
"Incorrect Central File Store Reference. " :
"Managment/Projected Finacials. " :
"Missing Account Pages. " :
"Missing/Incorrect Submission Sheet Details. " :
"Missing Subordinated Debt. " :
"New, Further, or Review Unmarked or Incorrect. " :
"Policy Requirments Missing for Housing Association. " :
"Policy Requirments Missing for LLP. " :
"Policy Requirments Missing for Professional Partnership. " :
"Unable to Consolidate. " :
"Submitted Direct from RM. " :
"Op Co/Prop Co Conditions Not met. ");ERRNO="2";FIELD ERROR := @Prompt([OkCancelList]; "Select An Error"; "Error No. 1"; "Error"; "Duplicate Submission. " : ...etc") + FIELD ERRORTWO := @Prompt([OkCancelList]; "Select An Error"; "Error No. 2."; "Errortwo"; "...etc
And then a MailSend
@MailSend("George Batty/SUP/NAG_EUROPE";"";"";"WinFAST/Farmcheck Rejected."; "This WinFAST/Farmcheck has been rejected due to the following errors. Please revise and resubmit with corrections if applicable."; "ERROR" : "ERRORTWO" : "ERRORTHREE" : "ERRORFOUR" : "COMMENT" : "BODY");
However, when I seelct 4 different errors and the mail responce i get is this:
This WinFAST/Farmcheck has been rejected due to the following errors. Please revise and resubmit with corrections if applicable. Duplicate Submission. Incorrect Central File Store Reference. Invalid Customer Number. Managment/Projected Finacials. Incorrect Central File Store Reference. Invalid Customer Number. Managment/Projected Finacials. Invalid Customer Number. Managment/Projected Finacials. Managment/Projected Finacials.
Sorry I kept it as brief as possible ... I've tried everything i can think of. Any help would be much appricated!
Upvotes: 2
Views: 117
Reputation: 30960
Use @Prompt([OkCancelListMult];
instead. User can select all relevant error message at a time then and there is no need for asking how many error messages user wants.
Your code would look like this then:
FIELD Errors := @Prompt([OkCancelListMult]; "Select Errors"; "Please select all relevant errors"; "";
"Duplicate Submission." :
"Invalid Customer Number." :
"Incorrect Central File Store Reference." :
"Managment/Projected Finacials." :
"Missing Account Pages." :
"Missing/Incorrect Submission Sheet Details." :
"Missing Subordinated Debt." :
"New, Further, or Review Unmarked or Incorrect." :
"Policy Requirments Missing for Housing Association." :
"Policy Requirments Missing for LLP." :
"Policy Requirments Missing for Professional Partnership." :
"Unable to Consolidate." :
"Submitted Direct from RM." :
"Op Co/Prop Co Conditions Not met.");
@MailSend("George Batty/SUP/NAG_EUROPE";"";"";"WinFAST/Farmcheck Rejected.";
"This WinFAST/Farmcheck has been rejected due to the following errors. Please revise and resubmit with corrections if applicable." ;
Errors : "COMMENT" : "BODY");
FIELD ErrorNumbers := @Elements(Errors);
Upvotes: 2