Jump to content

External data used to determine what image to use


ricky10ss

Recommended Posts

Hello,

 

I have created a job sort of similar to the setup posted here. My external data has an account field that might have the same account more then once on many occasions. Is there a count callout for the external data to to look to see if there is only account number return image A, if there are two of the same account numbers return image B and anything greater then 3 accounts numbers get image C?

 

Thanks,

Ricky

 

Using Windows XP and 7 with FusionPro 8.0.20.

Link to comment
Share on other sites

Is there a count callout for the external data to to look to see if there is only account number return image A, if there are two of the same account numbers return image B and anything greater then 3 accounts numbers get image C?

You want to do something like this:

var total = 0;
for (var r = 1; r <= externalDF.recordCount; r++)
{
   if (externalDF.GetFieldValue(r, "Account") == Field("Account"))
       total++;
}

switch (total)
{
   case 1:
       return Resource("A");
   case 2:
       return Resource("B");
   default:
       return Resource("C");
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...