Used to assign items to resources and dates using drag and drop.
Possible value | Description |
---|---|
Small | |
Medium | |
Large |
This is the first call made by the component. It is followed by the 'Get data' call to finish initialization.
Specifies the filter dropdowns to display and their values, using two result sets per filter.
The selected values will be passed to the 'Get data' call.
The selected values are also available for item links and day/resource links.
Called initially after the 'Get filters' call. Also called after a 'Move' call has requested a reload.
If @Mode is 'Weeks', then a temp table #WeekDates(FromDate, ToDate) is available with one row per week to show.
Possible value | Description |
---|---|
Days | If the view is grouped by days. |
Weeks | If the view is grouped by weeks. |
Label to show above the resource filter. The filter is only shown if a label has been given. Note that the filtering is only done client side so if your planner contains a lot of data it might be more suitable to use a filter dropdown.
The resources to show. If you want to include filtering of the resources, use the ResourceFilterLabel column from the general table.
The background color for the item. See Colors.
Color to use for the corresponding icon. If e.g. the icon column is named IconX, the color column is IconColorX. See Colors.
Called after an item has been moved using drag and drop.
Possible value | Description |
---|---|
Days | If the view is grouped by days. |
Weeks | If the view is grouped by weeks. |
The new background color for the item. See Colors.
Color to use for the corresponding icon. See Colors.
Allows you to validate the parameters supplied by the user before any other SQL is run in the component. This call is only made if the component has visible parameters, the SQL is a stored procedure, and Validate parameters is checked.
SQL that can have several resultsets that are displayed at top of component.
Sets the text color of <colname> to the specified color. See Colors.
Color to use for the icon specified in <colname>_Icon. See Colors.
Json to generate a row of meters. See the documentation for the Detailview component for more details.
Possible value | Description |
---|---|
Center | Center aligned. |
Left | Left aligned. |
Right | Right aligned. |
Possible value | Description |
---|---|
boolean checkbox | Legacy alias. Use "checkbox" instead. |
boolean dropdown | |
chart | |
checkbox | |
Checkbox tree | |
colorpicker | |
date | |
datetime | |
dropdown | |
file | |
heading | |
heading with checkbox | |
hidden | |
html | |
info text | |
listbox | |
multi-listbox | |
multi-picker | |
multirow | |
password | |
picture | |
radio buttons | |
textarea | |
textbox | |
textbox with autosearch | |
textbox with autosuggest | |
textbox with dropdown | |
textbox with popup | |
time | |
uneditable text |
Possible value | Description |
---|---|
Default | Inherit layout from menu item. |
LabelAbove | Full width, label above. |
LabelLeft | Label to the left. |
NoLabel | Full width, no label. |
Standard | Deprecated. Use LabelLeft instead. |
JavaScript that controls the mandatory status of the field, this overwrites nullchoice if set. This is only available to control types for which the mandatory JavaScript field is visible in the user interface.
Possible value | Description |
---|---|
Hyperlink | |
MailToLink | |
PhoneLink |
InfoSQL can declare JavaScript used by the menu item.
Example
SELECT
'thirdPartyApi.showMap(street, city, country)' AS JavaScript,
StreetAddress AS street,
CityName AS city,
CountryName AS country
FROM
...
Possible value | Description |
---|---|
Current | This is the current step. |
Done | This step has been completed successfully. |
Failed | Something went wrong in this step. |
Future | This step is later on in the process. |
Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.
Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.
The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.
If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.
Possible value | Description |
---|---|
Day | Day |
Four-Full-Weeks | 4 weeks (day view) |
Month | Month (day view) |
Month-Weeks |
Month (week view) Only available in the "Without time scale" mode. |
Quarter-Weeks |
Quarter Only available in the "Without time scale" mode. |
Two-Full-Weeks | 2 weeks (day view) |
Week | Full week |
WorkWeek | Work week |
A simple planner where tasks start in the Unbooked area and can be dragged to users.
CREATE TABLE Example.Task
(
TaskId int identity primary key,
TaskName varchar(100) NOT NULL,
DaysRequired int NOT NULL,
UserIdAssignedTo int NULL,
StartDate date NULL,
EndDate AS DATEADD(day, DaysRequired - 1, StartDate)
);
GO
INSERT Example.Task ( TaskName, DaysRequired )
VALUES
('ThreeDays', 3),
('OneDay', 1),
('TwoWeeks', 14);
GO
CREATE OR ALTER PROCEDURE Example.Task_Planner
@Action varchar(50) = NULL,
@Mode varchar(50) = NULL,
@FromDate date = NULL,
@ToDate date = NULL,
@ItemId int = NULL,
@Date date = NULL,
@ResourceId int = NULL
AS
BEGIN
IF @Action = 'GetData'
BEGIN
-- General.
SELECT
'Unplanned' AS UnbookedLabel,
1 AS UnbookedExpanded;
-- Resources.
SELECT
U.UserId AS ResourceId,
U.Username AS Resource
FROM
SoftadminApi.[User] U
WHERE
U.IsEnabled = 1;
-- Items.
SELECT
T.TaskId AS ItemId,
T.TaskName AS Title,
T.StartDate AS StartDate,
T.DaysRequired AS Days,
T.UserIdAssignedTo AS ResourceId
FROM
Example.Task T
WHERE
T.StartDate IS NULL
OR
(
T.StartDate <= @ToDate AND
T.EndDate >= @FromDate
);
RETURN;
END;
IF @Action = 'Move'
BEGIN
UPDATE Example.Task SET
UserIdAssignedTo = @ResourceId,
StartDate = @Date
WHERE
TaskId = @ItemId;
RETURN;
END;
RETURN;
END;