I have a table with 60 fields in it (call them field1, field2, etc.) These
are all number fields. The field names are important to what I want to do.
Let's call the field names fieldName1, fieldName 2, etc. I need to extract
the field name and field contents, but only from fields which are not empty.
The resultant information needs to go into a different field which we'll
call concatenatedText. The final contents of concatenatedText should look
something like this: "fieldName1: field1, fieldName5: field5, fieldName55:
field 55" assuming that fields 1, 5 and 55 are the only fields which contain
data.
I have a script where I loop through the fields. It looks something like
this:
Go to Field [fieldName1]
Set Field [counter; 0]
Loop
Set Field [counter; counter+1]
If [Get (ActiveFieldContents)=""]
Go to Next Field
Else
Copy [Select]
Go to Field [concatenatedText]
Paste [concatenatedText]
Insert text [", "]
End If
Go to Next Field
Exit Loop If [counter>60]
End Loop
Note that this script successfully extracts the field contents and adds it
to concatenatedText, but when I try to use Get (ActiveFieldName) as well, it
does not seem to work. It ends up going to concatenatedText and pastes that
field name instead of what I want. Where can I use this function in this
script, or is there a more elegant answer that I am missing?
Thanks for your input.
"Grip" <grip (AT) cybermesa (DOT) com> wrote
Quote:
What problems are you having? Can you post what you've got so far?
-G |