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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...