Answered
This topic has been closed for replies.
Yes, the checkboxes are at the top. it's ok if the number is unique. Not to make things too complicated. but how should I go around that?
I might need to be spoon feed on this. I'm a big-time novice.
thanks
OK, try this: Create two read-only text fields, called "InvoiceID1" and "InvoiceID2" and place them one on top of another.
Then add this code as the Mouse Up event of both check-boxes:
if (event.target.value=="0") {
this.getField("InvoiceID1").display = display.visible;
this.getField("InvoiceID2").display = display.hidden;
var prefix = "scd/fds/21/";
var v = Number(this.getField("InvoiceID1").valueAsString.replace(prefix, ""));
if (v==0) v = 5000000;
else v++;
this.getField("InvoiceID1").value = prefix + v;
} else if (event.target.value=="1") {
this.getField("InvoiceID1").display = display.hidden;
this.getField("InvoiceID2").display = display.visible;
var prefix = "scd/hh/21/";
var v = Number(this.getField("InvoiceID2").valueAsString.replace(prefix, ""));
if (v==0) v = 9000000;
else v++;
this.getField("InvoiceID2").value = prefix + v;
}
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
