Skip to main content

Hi,

 

Can anyone give me any pointers on how to acheive this....

 

I've got a view with a couple of Text Boxes.

I ask the user to enter the UserID of a AD (Active Directory) member, and then click a button (My Lookup Button)

 

i then use the AD Getuserdetails method to return the users details. i.e. name, department, email etc and fill in the other textboxes.

 

The issue is, the user can enter any AD account number and do a  lookup.

 

I want to restrict the lookup to only allow AD members beginning with E.

 

K2ers, is this possible?

 

P.S. If its not, then could i still do the lookup, but then stop the rule and pull up a message box to say "Oi you, didn't you get the memo, only E's allowed"

 

Hey Sharpharp1,

 

I think you can achieve this by setting a condition to check what the user entered on the resolving rule of the picker control you have.

 

 


Hi, 

 

You can use a SmartForms expression to validate the initial textbox the users enters data in. The Text Expression 'Starts With - Returns True if a given string starts with a specified substring'. 

 

If this is true then no need for the user to click a button, you can use a rule for 'when the text box changes' if Expression = true then call the SMO method, if false then show a message and then stop rule execution. 

 

That should work. 


Thanks guys,

 

Managed to get this done with an advanced Rule which checked text box to see if it begins with the letter E, if not, sends a message to screen.

 

Thanks!"!!!!!


Reply