Notices


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-Nov-2009, 05:16 AM
Senior Member
 
Join Date: Jun 2008
Posts: 647
exteNdSupport 1-9 reputation points
Default Re: Selecting a random item from a Global List

Greetings James,
Thank you for providing this kind of useful information.

Sincerely,
Steven Williams
exteNd & IDM Senior Specialist
Novell Engineering

On Thu, 05 Nov 2009 00:36:02 +0000, jhillyerd wrote:

> Hi. I searched around and didn't find anyone else doing this, but
> managed to figure it out so I thought I'd post a code snippet.
>
> We wanted to randomly choose an Exchange database when provisioning a
> new mailbox, but still give the option to change it if needed.
>
> I created a global list with the DNs of the Exchange databases. Added
> it to the approval form, then added the following code as an onload
> event:
>
> exdbs = IDVault.globalList(null, "exchange-database")[0]; idx =
> Math.floor(Math.random() * exdbs.length); form.select("exchangeDb",
> exdbs[idx]);
>
> "exchange-database" is the name of the global list, and "exchangeDb" is
> the name of the form field.
>
> Hope someone finds it helpful.
>
> -james


Reply With Quote
 

Tags
exchange, globallist, javascript, workflow

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 12:15 PM.


© 2007 Novell, Inc. All Rights Reserved.

Search Engine Friendly URLs by vBSEO 3.3.0 RC2