Marketcircle Home Products Support Blog Forums Partners Store
Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Building Reports and Print Layouts    Getting the Role of an Organization Linked to a Project
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Pro
Posted
If this is a stupid question, please forgive me. I've been trying to figure this out for hours now. First, I should mention that I am already acomplishing what I need to do with respect to contacts, however I can't make the same thing work for organizations. Here's what I've got going on now in a Merged document:

<$foreach object project.contacts$><$if object.projectRoles.roleType.name == "(Defendant)"$><$object.cachedName$><$endif$><$endforeach do$>

The essence is that it includes only the contacts who have the "Defendant" role in a project. I need to do the exact same thing for Organizations (since a company can also have the same role). Unfortunately, there doesn't seem to be a projectRoles key for organizations. I've tried several ways, but I just can't seem to find a way to get it.

Any help would be greatly appreciated!!!
 
Posts: 144 | Location: Des Moines, Iowa | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
Journeyman
Posted Hide Post
Hmm, this seems to work ok on my end:


<$foreach object object.organizations do$>
<$if object.projectRoles.roleType.name == "(Defendant)"$><$object.name$><$endif$>
<$endforeach do$>

HTH!
-E
 
Posts: 96 | Location: San Francisco | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
Pro
Posted Hide Post
Eric,

Thanks so much for your effort. Unfortunately, it's not doing the trick for me. I might be approaching this the wrong way, but let me ask some questions about what you've done.

<$foreach object object.organizations do$>

Shouldn't this should read:

<$foreach object project.organizations do$>

Aren't you loading an array of organizations into the object? Or are you doing something that I'm missing?
 
Posts: 144 | Location: Des Moines, Iowa | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
Journeyman
Posted Hide Post
Well, I'm not sure where you are implementing this, but I was just playing around with a page layout .dlrpt report that applies to a Project- so the key path stuff might be different if you are trying to do it from a merge letter..

And there might be a different way of getting this, but I found that running 2 loops was the way to get this information. So the following returns all the Orgs linked to my selected project that have a role of "Financial":

<$foreach object objects do$>
Orgs with a Financial Role:
<$foreach object object.organizations do$>
<$if object.projectRoles.roleType.name == "(Financial)"$><$object.name$><$endif$>
<$endforeach do$>
<$endforeach do$>

So the first loop is pretty much because more than one project could be selected, and then the second is looping across the current (usually only 1) project's organizations. But yes, it's object, not project in the loop..

I'm sure AJ has a better way, but this seems to work. It's a tricky many-to-many problem..
 
Posts: 96 | Location: San Francisco | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
Pro
Posted Hide Post
Eric,

I actually figured it out. Here was the final result:

<$foreach object project.roles$><$if object.roleType.name == "Defendant"$><$object.organization.name$><$endforeach do$>

I just had to go back to basics and take a second look. I'm sure you know how it is, after hours of looking at the same thing, you start to miss the obvious stuff! In any case, thanks again for the help!
 
Posts: 144 | Location: Des Moines, Iowa | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
Journeyman
Posted Hide Post
Glad you got it figured out.. I do know that feeling of absolute frustration very well. Perhaps there should be an <$obscenity$> merge tag smile
 
Posts: 96 | Location: San Francisco | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
Pro
Posted Hide Post
You got that right!

Actually, I think the data structure in DL is pretty well though out. Part of the problem with this application is that I really have to do everything in the merge engine instead of the report engine. Although I've used the merge templates a lot more than the report engine, what little time I have spent working with reports has proven that the report editor is MUCH more robust than the merge template editor. I really wish MC hadn't treated merge templates as the red-headed stepchild of this release, it would have saved me a ton of time...
 
Posts: 144 | Location: Des Moines, Iowa | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Building Reports and Print Layouts    Getting the Role of an Organization Linked to a Project

 

Refund Policy | Privacy Policy | Site Map | About Marketcircle
©2008 Marketcircle Inc. All rights reserved.
webmaster@marketcircle.com