One thing that jumps out (though, not the answer to your question) is that if there are more than 9 transactions, you will not have them in numerical order. This can be fixed by adding a forward slash to the list of choices for @PopupMenu, like this: @PopupMenu(vEdits + "/;" ,"choose to print")
The slash stops @PopupMenu from sorting the list. The side effect is that you will have a small arrow after the last choice on the list. You'll need to decide which is the lesser of two evils: numbers out of order, or a small, barely noticable arrow.
You may notice that I also removed the two double-quotes before vEdits. They weren't doing anything because you didn't have anything between them (not even a space).
Now, to answer you question. I have highlighted the parts that I added. This should strip out any of the transaction types that don't contain the word "Charge". I believe this is what you were asking for, yes?
var n as Int var vCount as Int var vEdits as String var vChoice as String
var vbilledAmount as String var vtransactionId as String var vChargememo as String
If @Mode() < 2 { vCount = @FormResultSetTotal("Payments") If vCount = 1 Then If @FormFieldValue("Payments", "TransactionType", 1) = "" Then vCount = 0 For n = 1 to vCount If @Instr( @FormFieldValue("Transactions", "TransactionType", n), "Charge" ) > 0 vEdits = @AppendStringArray(vEdits, "Print Reminder for Transaction# " + n) //writeln(vedits) Next PopupSelectPosition(4, @XPos(ThisElement), @YPos(ThisElement)) vChoice = @PopupMenu(vEdits + "/;" ,"choose to print") TempTransType = @FormFieldVAlue("payments", "TransactionType", @Num(vChoice)) vbilledAmount = @FormFieldVAlue("payments", "Billed Amount", @Num(vChoice)) vtransactionId = @FormFieldVAlue("payments", "TransactionId", @Num(vChoice)) //vChargememo = @FormFieldVAlue("payments", "ChargeMemo", @Num(vChoice)) //This is were my MergeFilePrint code will go writeln(TempTransType) writeln(vbilledAmount) writeln(vtransactionId) }
|