Last active
December 22, 2015 02:08
-
-
Save avasyukov/6401215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the list of available users and push it into model | |
// UI control will be created automatically | |
var userConstraint = []; | |
// Loop through managees and add them all to constraint | |
for each( user in managees ) | |
{ | |
// 'Label' is what user will see in user interface, 'value' is what will be passed to report script | |
userConstraint.push( { "label": user.firstName + ' ' + user.lastName, "value": user.userName } ); | |
} | |
// UI config is stored here | |
model.meta = []; | |
// Create new control, set field name in 'field', control type in 'type' and available values in 'values' | |
model.meta.push( { "field": "user", "type": "select", "values": userConstraint } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment