Check 'If LDAP field exists for user then...

If I have a query which returns the LDAP data for a user how can I run an 
'IF' on whether or not a field exists?

For example
If LDAPFieldX Exists then....

I've tried IsNull and a few others but they don't seem to work.
3/5/2010 12:19:01 AM
scripting.vbscript 564 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 46

Hi Dan,

Generally, for detecting existence of an object or property, you can use 
IsNull or IsEmpty as below:

propertyout = ""
prop = Session.Property("SOMEPROPERTY")
If IsNull(prop) Or IsEmpty(prop) Then
' do stuff
propertyout = propertyout+prop
' do other stuff
End If 

For LDAP component they're of COM based objects and you can tried directly 
access the certain properties and use Error handling code to capture error 
in case the property not exist.


Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at:

Get notification to my posts through email? Please refer to

>From: =?Utf-8?B?RGFu?= <>
>Subject: Check 'If LDAP field exists for user then...
>Date: Thu, 4 Mar 2010 16:19:01 -0800

>If I have a query which returns the LDAP data for a user how can I run an 
>'IF' on whether or not a field exists?
>For example
>If LDAPFieldX Exists then....
>I've tried IsNull and a few others but they don't seem to work.

3/5/2010 8:25:35 AM

Similar Artilces:

Connect to Exchange using http keeps checking itself
Running Exchange 2007, I have one user in our office who occasionally will have their Outlook 2007 check the connect to Microsoft Exchange using HTTP box and then the Only Connect to proxy servers that have this principal name in their certificate. We use a certificate just one you can create yourself, we don't have issues with other people who use the certificate to connect with outlook from their homes but when in the office this user occasionally will have outlook check this for him. He unchecks the area and it works for awhile but eventually it returns. Any help wou...

How to create new lead for existing customer?
We are tracking all new leads, whether it is a new prospect or new lead within an existing customer. But when you enter a new lead, it will not allow you to pull an existing account. You have to rekey all company data. Any thoughts? Seems kind of like a backwards approach (which is why there's no option to do this). I would think you would just create a new contact inside an existing account. -- Brandon IT Director Presentations Direct - Office Equipment & Supplies "Jan Kratochvil" <Jan>...

sum of check box
Hi, I made a report from a query. In my report I have multiple check box (yes/no). I would like to sum all the yes check box at the end of the report. I tried =Abs(Sum([name_of field])) as well as =Sum(IIf([name_of_field]=True,1,0)) and for both, I get the result on the report as ''yes''....???... Any suggestion? Thanking you in advance! Cheers, Ka Fix the format property of the sum control (xerox engineering?) Pieter "ka" <> wrote in message > Hi, > >...

Extracting the last word of a field
Hi all, I have an excell sheet where one column contains the address data including the city. I want to take the city from this field and put it in another field. The method I thought is to fiind the LAST space character, and extract what is on the right of this space character. I try to use FIND & RIGHT functions, but as there are more than one space characters in each column, it does not work. Can anybody help. Thanks for answers one way: =MID(A1,FIND("$",SUBSTITUTE(A1," ","$",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))+1, 255...

Converting a string date field/node in an XML document to Date type in a dataset
I am having problems with Date Strings when using method of converting an XML document to a dataset. I need the the date nodes to be of date type. As I am loading the Dataset to a datagrid, and I using the sort facility to sort by date. Currently the dates are being treated as strings. (ree32) wrote in message news:<>... > I am having problems with Date Strings when using method of > converting an XML document to a dataset. > > I need the the date nodes to be of date type. As I am loading the ...

Mouse Scroll Wheel in Memo Fields
How can I get my mouse wheel to scroll down a Memo Field control? (it works fine on combo boxes) ...

Errors exist in the page of
So i can't save my options. When i open the IE browse, it will always pop up this page. Always state your full Windows version (e.g., WinXP SP3; WinXP 64-bit SP2; Vista SP1; Vista 64-bit SP2; Win7; Win7 64-bit) as well as your IE version when posting in an IE-specific forum or newsgroup. Please do so in your next reply. What anti-virus application or security suite is installed and is your subscription current? What anti-spyware applications (other than Defender)? What third-party firewall (if any)? Were any of these applications running in the background when you inst...

field order
I made a pivot table report. somthing like following, it is about serve access count Server1 server server3 server 4 Date time 10/1/2004 1:00pm -6:00pm 1000 5600 50050 243243 10/1/2004 8:00am -12:00pm 23424 4234 4234 674 9/29/2004 1:00pm -6:00pm 2 3243 32 4234 9/29/2004 8:00am -12:00pm x x x x 9/30/2004 1:00pm -6:00pm x x x x 9/30/2004 8:ooam -12:00pm 256 ...

Conditional Printing of Certain Fields in A Report
i need to have a conditional printing of some fields (SEE BELOW) VENDOR SHARE $999.99 LESS TAX $999.99 country ENGLAND tax (%) 20% AMT DUE $999.99 how do I print only these 5 lines when the tax amount is not zero. Also how do i combine line 2,3 & 4 and looks like LESS ENGLAND (20%) TAX instead. I tried doing the following: ="LESS" & [COUNTRY] &"(" &[TAX (%)] &")" in the control source but i got a #ERROR error Any help would be appreciated. Kevin T <Kevin> wrote: >i need to...

LDAP and Check Names
We currently have Outlook 2003 connected to an Exchange 5.5 server (neither of these products can be upgraded), and our organisation has an LDAP server. I have added the LDAP server into Outlook, and if you go to the Address book and do a search, it returns all the values it is supposed to. However, you change the order of the address books so that the LDAP server is searched first, type a name (surname or forename) into the "To" box and click check names then the LDAP server is not searched. Instead the following error is generated: "The search request to the L...

Calculated field 02-05-08
I am trying to calculated the number of days between to manually entered dates.Example.... Start date=02/05/08 and due date=02/08/08.... 3 days right? how do i get it to show on my form and entered into my table? Jim, It is bad practice to store calculated fields in your tables. If you need to store is somewhere you typically use a query for this. You'd then use yhis query as the source for your form. Calculation in the query: create a new field called difference like this difference: datediff("d",[firstdatefield],[seconddatefield]) hth -- Maurice Ausum "jim"...

e-mail address is unresolved in the From field
Hi there! if got a problem with the resolve of the "From" Contact when i send an e-mail through outlook and track it to CRM. When I switch to CRM to watch the created E-Mail activity i get the following message: "The sender's email address could not be resolved to a record in the system. At least one recipient could not be resolved to a record in the system." But the contact exists in CRM, the link has to be done each time manually, which is very annoying! Any ideas / solutions? hy looks like the emails is used more than one time in the crm system. take care: c...

Error after creation a custom field with Schema manager
This is my first attempt to customize the CRM. I used Schema manager to create a new field (attribute) and it seemed to be allright there. Then I published the customization, restarted the IIS and entered the CRM. Now an attempt to enter the customized area (I tried it with Leads and Opportunities) produces an Error without any informative message. Yet, I successfully customized a form with a new tab, new screen controls and OnChange event. Did anybody encounter a similar problem and/or knows a cure? boazM Do you removed any field? To see the error details turn On DevErros key on

Table fields not appearing in report writer
I have created an add-in app for GP. With the app are reports. When I go into Great Plains in the Report Writer and modify the report I need to create a relationship with existing GP tables. When I am in the Report Writer and I choose the MY table and look at the table, I can see all the fields. When I go to create a relationship, I click the Relationship button, select Great Plains for the product, select the table I want and choose the index. In the portion of the form where you associate one field with another, the secondard table (GP) shows the fields that are in the index. H...

Autopopulate Multiple Fields in Table Using a Form
I have a form based on a table where I want to store data. The data to store comes from combo boxes based on various lookup tables. The wrinkle is that there is one lookup table that contains 2 fields of data (questionnum and question) I want stored in the table once the questionnum is selected. The question field is formatted as 'memo'. When I create the combo box the question field is not an option for selection. I add it manually to the properties after completing the criteria for the combo box. I have been struggling with the code used to autopopulate more than one field but...

Having 2 user identeties in 1 profile
Hello I have a little question is it possible to have 2 user identeties in 1 outlook profile? The reason im asking is cause a user has 2 mailboxes and wants to reply to mail sent to each of them with that mailboxes email adress. At the moment i have setup a dummy pop3 with the addy for one of the accounts account and have it set so it never tries to get any mail from the server, just to be able to send through smtp now what i really would like to do is just have 2 identeties in 1 outlook profile so i can get rid of the dummy pop3 account cause it feels like its going to give m...

Share Calendar and see other users Appointments
Hi, It is probably a rookie question but i hope that someone has mercy and answers this with some tips or pointers to assist me to make this work. We did switch from goldmine to MSCRM. The biggest issue we have now is that it seems that users can only access their own calendars. I was able to make an appointment for another user that want to join the meeting but if there is already a meeting schedule then there is no waring. Also the assistant can not pull up the supervisors calendar to schedule appointments for him. Basically we have a small sales team and 2 people that make the appo...

Keyword search for a comments field
Hello and thank you in advance. I have a forms that limits the rows to be displayed from a Querry sheet from what is picked in the form. I have it all tied into a OK button on the Form. I now have a comments field and my boss would like to use the comments field to select certain data. EXAMPLE: type/select Laser and only the rows that have laser in there comments field would be displayed. If I write the following code into the Querry sheet it works fine but now I need it to work in my form. Code: Like "*" &[enter search key word] & "*" In Wher...

Printing a User Form
I have a user form using columns A-V in Excel which scrolls down to Row 200. Each row contains customer details in the colums A to V e.g, Name/Address/ Contact Numbers/ Age etc. As I scroll down the list of custermers their details appear in the relevant boxes on the User Form. Is it possible when a customers details fill in the relevant boxes that I can print the User Form with just their details. I hane placed a Command Button ( Print ) on the User Form however cannot get it to print. Any help would be much appreciated. Hi Mully, > I hane placed a Command Button ( Print ) on the...

user form
I am so frustrated. I am creating a form and I want to force a phone number format. Easy in Excel but cannot find it anywhere in word 2007. Please help Thanks Use the VBA Format function Format(1234567890, "(###) ###-####") will return (123) 456-7890 -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via "Dcook" <> wrote in message news:5F0E1C93-E828-46F7-98EF-FE6DF84...

Prompt to Ask If User Wants to Create a Duplicate Record
For example, let's say there's already a record for Mary Shelly, and I have a new Mary Shelly that I'm trying to add to my database. Can I make it so that Access will prompt me and say "There is already a record matching this description. Do you wish to continue?" Hi Dove, I'm assuming first and last name are in the same field. Create a button or Label and add this code to the On Click event but make the following changes to the code: NAMEFIELD= The name of the field where the name is kept on the form TABLEWITHUSERNAMES = The name of the table where the username i...

Managing Exchange 2000 organisation users private mailbox permissions?
Hi, Is there some utilty to manage Exchange 2000 all users mailbox permissions ? Neither AD or System manager seem to have that possibility. Changing through each user mailbox is time-expensive.. I have a need to change all users calendar permissions to certain level and keep them there administratively. thank You in advance, Kalle Rahu beginning Exchange 2000 administrator ...

Setting the default address book for all users?
Hi, I was just assigned the Exchange admin duties at our office. We have Exchange 2003 server on Windows 2003 Enterprise. Outlook XP (but moving to Outlook 2003 clients) Office management wants the default address book that displays first to be an Outlook address book instead of our Global Address book (our global address book contains email addresses of other outside offices and an email was accidently sent outside to someone with the same name). They want this done for ALL USERS. I know how to do it in Outlooks with the Tools->Address Book-> Options etc. Is there a way to set th...

User Mailbox that more than one person sends e-mail from
Do to a SARBOX requirement we were told to set all user passwords expire. The issue is we have some users that we set up where more than one person sends e-mail from it. We set the mailbox up in outlook for the people that need to send mail as that user. When those user's password expires the person trying to send - gets an error and is not allowed to send. Is there any way to get around this issue? Thanks Jennifer Jennifer: For your shared mailbox, I would disable that account. Then, create a security group that contains as members everyone that should have permissions t...

Information Could Not Be Verified. Please Check Your....
Well, it finally bit me. I have Money 2006 Premium. All has been working great for online updates for months. Suddenly, two days ago, this message appeared, and I am locked out of doing any online updates to the current record/file. I have tried all 8 of Microsoft's suggested fixes. I can connect using the Sample.mny file, but when I then go back to my regular My Money.mny file, the same error message pops up again. Is there something someone here knows that I may be overlooking. I would surely hate to start this file from the beginning. Thanks, In, MBO ...