This option lets you search for a BuildList to edit. The search will look at:
- Name
- Title
- Unselected SQL
- Unselected Plus SQL
- Selected SQL
Path: Admin Toolbar > Advanced > System Administration > MyUIAdmin > Edit BuildList
- Begin typing or double click to select from a list.
- Edit Selected BuildList
he BuildList function allows you to present the User with two lists of items. One is a list of SELECTED items. The other list, known as the MASTER list, is a list of all items that have not been selected. The user is then able to click on items in either list and move them to the other list. Updates occur after each click, or the user can use checkboxes to select multiple items to transfer.
You must present four sets of SQL statements:
- The Master Select.
- This tells the system how to select the master list. Your select list must return a record ID and a Name/Description
- The Selected List.
- This SQL statement tells the system how to generate a list of selected items. Your select list must return a record ID and a Name/Description
- Add-To-List.
- This update statement tells the system how to add an item to the selected list (and thus remove it from the Master List)
- Delete-From-List.
- This update statement tells the system how to remove an item from the Selected List and place it back into the Master list
- Note on variables. '${body}#39; variables are automatically wrapped in quotes if empty, but '^' variables are not wrapped in quotes. Note that you can also substitute any SQL statement with INCLUDE xxx.inc where xxx.inc is the name of a file with PHP code that you will generate an SQL statement. This can be handy when you have complex logic that cannot be handled by simple variable replacement. When generating your Add and Delete statements, the ID of the item in the master list is referred to by $MasterID and the ID of the item in the selected list is referred by $SelectID Other points of interest:
- The Master List Title and the Selected List Title are optional fields that let you define the headers for master list of items and the selected list of items. It is recommended that you use these fields, but it is not required.
Setting up the Add by Search option
The Add by Search option will let users use an ajax search screen to find unselected elements. A link labeled Add by Search will be displayed above the title bar. The SQL for an add by search can be a straight SQL statement or a call to an class method with an optional SQL fragment.
Standard SQL:
If you use a custom SQL statement, you will need to use '!words' as a placeholder for the text entered by the user, and you must return the standard ID, Name, Description(optional):
SELECT user.ID, getUserName(user.ID, 'L'), user.cAffiliation
FROM dcUser AS user
WHERE
user.cLname LIKE '!words'
Call to Method:
+USERUTIL userSearch |
LEFT JOIN dcGrader AS grader ON
grader.iUserID=user.ID
AND grader.iLinkID='$iLinkID'
AND grader.cLinkTable='$cLinkTable'
AND grader.bDeleted=FALSE