Referencing Partial Field Names

I have a group of fields, FieldName0 through FieldName9, and I want to create a Javascript routine for a button that is dynamic so it can reference any one of those fields. I have a table of data, some of which is defined by LookUp and some JS functions. But, once they've been given content, they can't be reset back to Null - empty, or whatever. So, I figure to create a Reset button that will remove the content of all the selected fields for that button, setting them back to blank fields.

I'd rather not clutter up the script page with a separate function for each field.

So, I'm wondering if the number of a field name can be peeled off and used, say, as a switch parameter.

For example, if I want the Button's script operate on FieldName3, I'm wanting to peel off the '3' so that the button will only affect the 3rd instance of one or a group of fields. I want to use that '3' to allow a dynamic reference to those certain other fields that are also the 3rd instance.

Is this possible?

Leave a Comment