So I have combined both scripts in the one page, and I renamed the 2nd script's for-next variable as "j" because "i" was already used in the previous script.
I have left the invisible fields visible for now, to see how everything is working. In the Combined fields, I am only getting last names in fields 2-4. For the first candidate, the Firstname field populates, then it puts an initial and no last name in the first Combined field. Any thoughts on what is going wrong? Thanks!
So here is what I have presently in the OnOnline script area:
dim i as integer
dim party as xpTextObject
dim quad as xpBaseObject
dim mat as xpMaterial
' loop over 4 candidates
for i = 1 to 4
self.GetObjectByName("Party" & i, party)
self.GetObjectByName("PartyLogo" & i, quad)
if engine.GetMaterialByName(party.text, mat) then
quad.SetMaterial(0, mat)
end if
next
dim firstname as xpTextObject
dim lastname as xpTextObject
dim combined as xpTextObject
dim j as integer
for j = 1 to 4
self.GetObjectByName("FirstName" & j, firstname)
self.GetObjectByName("LastName" & j, lastname)
self.GetObjectByName("Combined" & j, combined)
combined.text = firstname.text(0) & ". " & lastname.text
next
#XPression