I have an external data file where I'm wanting to pull in Names and Addresses based on a User ID Field. There is a field in the external data file called "UserID", which contains a 6-digit number. What I am trying to figure out is how to write the code so that based off of the number that is entered into the User ID field, the Name, Address and City fields that correspond to that row will be returned.
This is what I have so far, which I know is not correct.
if (FusionPro.inValidation)
Rule("OnJobStart");
var FirstName = "";
var LastName = "";
var Address1 = "";
var Address2 = "";
var City = "";
var PA1 = "";
i = XDF_Address.FindRecord("Value", Field("UserID"))
{
FirstName = XDF_Address.GetFieldValue(i, "MultiFirstName");
LastName = XDF_Address.GetFieldValue(i, "MultiLastName");
Address1 = XDF_Address.GetFieldValue(i, "MultiAddr1");
Address2 = XDF_Address.GetFieldValue(i, "MultiAddr2");
City = XDF_Address.GetFieldValue(i, "MultiCity");
}
var PA1 = "";
PA1 = AppendText(PA2, " ", FirstName);
PA1 = AppendText(PA2, "<p>", LastName);
PA1 = AppendText(PA2, "<p>", Address1);
PA1 = AppendText(PA2, "<p>", Address2);
PA1 = AppendText(PA2, "<p>", City);
return PA1;