C
chappy110
I brand new to Jscript so please bear with me and any help is
appreciated. I have an app and I'm trying to create a new report using
Jscript. I have a some difficulty putting the language together that
will bring together elements from a contacts object and the related
associations records. The end result I going for is a semi-colon
delimited file (see second Response.Write statement) that includes
fields from both Contacts Object and the Associations. When I move
"var eAssociates" and "var oObj" lines out of the "for: brackets it
works, but it does not work as outline below. Thanks in advance for
any assistance.
Thanks
Andy
var enume = new Enumerator(Project.getContacts());
var oItem;
if (enume.atEnd())
{
Response.WriteLine("There are no contacts in the project.");
}
else
{
for (; !enume.atEnd(); enume.moveNext())
{
oItem = enume.item();
var eAssociates = new Enumerator(oItem.getAssociations());
var oObj = eAssociates.item();
Response.Write(oObj.Name)
Response.Write(oItem.Name + ";" + oItem.Title + ";" + oItem.HomePhone
+ ";" + oItem.DayPhone + ";" + oItem.emailaddress + "\n");
}
}
%>
appreciated. I have an app and I'm trying to create a new report using
Jscript. I have a some difficulty putting the language together that
will bring together elements from a contacts object and the related
associations records. The end result I going for is a semi-colon
delimited file (see second Response.Write statement) that includes
fields from both Contacts Object and the Associations. When I move
"var eAssociates" and "var oObj" lines out of the "for: brackets it
works, but it does not work as outline below. Thanks in advance for
any assistance.
Thanks
Andy
var enume = new Enumerator(Project.getContacts());
var oItem;
if (enume.atEnd())
{
Response.WriteLine("There are no contacts in the project.");
}
else
{
for (; !enume.atEnd(); enume.moveNext())
{
oItem = enume.item();
var eAssociates = new Enumerator(oItem.getAssociations());
var oObj = eAssociates.item();
Response.Write(oObj.Name)
Response.Write(oItem.Name + ";" + oItem.Title + ";" + oItem.HomePhone
+ ";" + oItem.DayPhone + ";" + oItem.emailaddress + "\n");
}
}
%>