I am working with arrays and I need a little further assistance on getting a handle on the values. I have some fields whose type is textlist, which means they can have multiple values in each. I need to get a handle on each value individually for use later in the code. Here is what I have thus far:
Field called doi_1 is a text list that has two or more values in every document. Each value is separated by the ‘|’ symbol; for example: 080407|080408.
I need to get a handle on the values ‘080407’ and ‘080408’ individually. Here is a sample of my code, and the results that I get:
for d=0 to ubound(doc.doi_1)
d2 = “hard coded text” + doc.doi_1(d) + “hard coded text”
msgbox d2 (just to actually see the output)
Next
The above code produces:
hard coded text 080407|080408 hard coded text
How do I just grab the first value in the array (080407) and set a temp variable with it, then grab the second value (080408) and do the same? The desired output is:
hard coded text 080407 hard coded text
hard coded text 080408 hard coded text
The other option I tried is:
if doc.doi_1(0) <> “” then forall t in doc.doi_1
d3 = “hard coded text” + t + “hard coded text”
end forall
end if
msgbox t (just to see the output)
The output is the same: hard coded text 080407|080408 hard coded text.
Any help would be greatly appreciated. Thanks.