HELP ME Please! DIsplay Contacts with CFExchange tags in ColdFusion 8

MightyMikey
MightyMikey used Ask the Experts™
on
I keep hitting walls and it continues to place my job security on the line.

If you look over http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Cold_Fusion_Markup_Language/Q_26935850.html I managed to make the connection but the page displays nothing. It's blank. I have searched using various search engines but cannot find the solution that works.

Are there special display tags in ColdFusion to display the contact list or is it not retrieving the contact list at all? It will be use for our company's Intranet site we are implementing in the near future.

Here is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Employee Directory</title>
</head>
<body>

<cfexchangeConnection action="open"  
    username="DOMAIN\myUsername"  
    password="xxxxxxxxxx"
    mailboxName="myUsername@DOMAIN.com"
    server="XXX-XXX-XXXXX.corp.DOMAIN.com" FQDM
    protocol="https"  
    connection="test">      
   
<cfexchangecontact action="get" name="myContacts" connection="test">
     
<cfexchangeConnection action="close" connection="test"/>



</body>
</html>


Could it be the "name= "myContacts"" is the wrong path?

Thanks. I really need to move forward with this for I fear it will be my last chance given to redeem myself for the job position I am in.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Can we see your output code as well?

I am puzzled by this attribute
server="XXX-XXX-XXXXX.corp.DOMAIN.com" FQDM

i dont think you should put FQDM in there

the name you are using is fine, it is just a query object that you are assigning it to.
did you <cfdump var="#myContacts#"> ?

Author

Commented:
If by output code you mean what shows in the Logs on the server, then this is what is showing up:


2011-05-17 18:36:31 x.x.6.24 PROPFIND /exchange/myUsername@DOMAIN.com - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 210
2011-05-17 18:36:31 x.x.6.24 SEARCH /exchange/myUsername@DOMAIN.com/Contacts - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 5
2011-05-17 18:36:31 x.x.6.24 PROPFIND /exchange/myUsername@DOMAIN.com - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 218
2011-05-17 18:36:31 x.x.6.24 SEARCH /exchange/myUsername@DOMAIN.com/Contacts - 443 DOMAIN\myUsername x.x.6.255 Jakarta+Commons-HttpClient/3.0.1 207 0 0 33
2011-05-17 18:36:31 x.x.6.24 PROPFIND /exchange/myUsername@DOMAIN.com - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 211
2011-05-17 18:36:31 x.x.6.24 SEARCH /exchange/myUsername@DOMAIN.com/Contacts - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 4
2011-05-17 18:36:32 x.x.6.24 PROPFIND /exchange/myUsername@DOMAIN.com - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 210
2011-05-17 18:36:32 x.x.6.24 SEARCH /exchange/myUsername@DOMAIN.com/Contacts - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 4
2011-05-17 18:36:32 x.x.6.24 PROPFIND /exchange/myUsername@DOMAIN.com - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 219
2011-05-17 18:36:32 x.x.6.24 SEARCH /exchange/myUsername@DOMAIN.com/Contacts - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 34
2011-05-17 18:36:32 x.x.6.24 PROPFIND /exchange/myUsername@DOMAIN.com - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 207
2011-05-17 18:36:32 x.x.6.24 SEARCH /exchange/myUsername@DOMAIN.com/Contacts - 443 DOMAIN\myUsername x.x.6.255 Jakarta+Commons-HttpClient/3.0.1 207 0 0 4
2011-05-17 18:36:34 x.x.6.24 PROPFIND /exchange/myUsername@DOMAIN.com - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 211
2011-05-17 18:36:34 x.x.6.24 SEARCH /exchange/myUsername@DOMAIN.com/Contacts - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 3
2011-05-17 18:36:34 x.x.6.24 PROPFIND /exchange/myUsername@DOMAIN.com - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 206
2011-05-17 18:36:34 x.x.6.24 SEARCH /exchange/myUsername@DOMAIN.com/Contacts - 443 DOMAIN\myUsername x.x.6.25 Jakarta+Commons-HttpClient/3.0.1 207 0 0 3


Using <cfdump var="#myContacts#"> I get
 EE
However, I believe that is because that account does not have contacts listed and/or saved. I used my personal account which displays some variables but not others due to "empty strings"

How can I choose which strings to display instead of all of them in the default <cfdump>?

Thanks,
This progress has pleased my boss. The tension and stress level on my has gone down a bit.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

You can use a query of a query to to display just the columns you want

<cfquery name="myContacts" dbtybe="query">
    select Company,Email1,BusinessPhoneNumber
       from myContacts
</cfquery>

<cfoutput query="myContacts">
   #Company# - #EMail1# - #BusinessPhoneNumber#<br>
</cfoutput>

Open in new window

Treat your "myContacts" variable just like it was in a CFQUERY tag   <cfquery name="myContacts"....>

It's really the same thing at this point, you can reference specific columns and records...

<cfoutput query="myContacts">
   #myContacts.displayAs#<br>
</cfoutput>
oops, posts crossed.   But I don't think you need the query of query.. unless you have a WHERE clause to add, otherwise, just treat it like you would any other query...
good point @gdemaria, i forgot to tell them that you can sort with the query of a query


<cfquery name="myContacts" dbtybe="query">
    select Company,Email1,BusinessPhoneNumber
       from myContacts
     order by Company asc
</cfquery>

Open in new window

good addition cfengineers...

 ...and here's an example if you want to make sure the email address is populated (it will skip all the ones that do not have an email).   This is just an example, change it to be however you need it..

But again, if you don't need a where clause or sorting, just use myContacts directly.


<cfquery name="myContacts" dbtybe="query">
    select Company,Email1,BusinessPhoneNumber
       from myContacts
     where EMail1 is not null
     order by Company asc
</cfquery>

Open in new window

Author

Commented:
Alright fellas,

I was out to lunch so I am testing out the different replies. Getting near towards the end of the day here at work so I will probably post findings tomorrow.

Thanks again guys.

All of you are saving my behind here.

I have a ColdFusion book they gave me to read but I am more of a hardware guy. This is all new, exciting, and challenging to me.

Author

Commented:
Thanks everyone. This was the missing piece to the puzzle. My boss is pleased that I addressed it so quickly. Little does he know of EE. :)

I will continue reading up on ColdFusion to expand my knowledge.

Thanks again.I will be awarding points now.

Author

Commented:
The answer was dead one. Just what I needed.

just curious if you were able to use the myContacts query that is generated by the cfexchangecontacts or was it necessary for you to add the query-of-query?

The query-of-query will slow down the page significantly, so if you don't have to change the sort order or add a filter, try not to use it..

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial