I'm trying to remove all types of requests and add only a 'Remote Work Request'. I changed the code as shown in the screenshot, but in the app, it shows -1 day. Also, when I open my 'Leave Balance' section, it's completely empty, and there is no 'Remote Work' part
Set(_sendEmailsEnabled, false);
Concurrent(
//collection used in the left nav menu
ClearCollect(EmployeeNavigation,
{MenuItem: "My Leave Requests"},
{MenuItem: "My Leave Balance"},
{MenuItem: "Log out"}),
//collection used in the left nav menu
ClearCollect(ManagerNavigation,
{MenuItem: "Leave Requests"},
{MenuItem: "Log out"}),
//add custom leave types to this collection to make them show up in the app
ClearCollect(
LeaveTypeCollection,
Table(
{
type:"Remote",
icon:Remote,
iconselected:'Remote-selected',
description:
"Remote work is provided to all employees, "
}
)
),
//defines leave start and end for requests. Default set to Now since most users will be creating new requests. Changes to reflect leave times for requests which are being edited
Set(_leaveStart,Now()),
Set(_leaveEnd,Now()),
Set(_myProfile,Office365Users.MyProfile()),
ClearCollect(EmailTemplate,
"<html>
<head>
<meta http-equiv=""Content-Type"" content=""text/html; charset=us-ascii"">
</head>
<body>
<p>
There is a leave request from: {SubmitterName} pending your approval. <ul><li>Type: {LeaveType}</li><li>Title: {LeaveTitle}</li><li>Description: {LeaveDescript}</li><li>Start Date: {LeaveStart}</li><li>End Date: {LeaveEnd}</li>" &
"</p>
</body>
</html>"
),
ClearCollect(HolidaysCollection,
{HolidayName: "Thanksgiving", StartDate: DateValue("11/22/2018")},
{HolidayName: "Day after Thanksgiving", StartDate: DateValue("11/23/2018")},
{HolidayName: "Christmas", StartDate: DateValue("12/25/2018")},
{HolidayName: "DayAfterChristmas", StartDate: DateValue("12/26/2018")},
{HolidayName: "New Year's Day", StartDate: DateValue("1/1/2019")})
);
ClearCollect(LeaveCollection,
{Title: "Vacation", Detail: "Example vacation request", StartDate: Today(), EndDate: DateAdd(Today(), 6, TimeUnit.Days), LeaveType: "Vacation", Requester: _myProfile.UserPrincipalName, Approver: _myProfile.UserPrincipalName,
Status: "Pending", LeaveID: _myProfile.UserPrincipalName&Text(Now(), "[$-en-US]mm-dd-yyyy-hh-mm-ss-fff")});
ClearCollect(BalanceCollection,
{
EmployeeEmail: _myProfile.UserPrincipalName,
EmployeeName: _myProfile.DisplayName ,
Year: Text(Year(Now())),
Remote:25,
RemoteUsed:0,
BalanceID:_myProfile.UserPrincipalName&Text(Now(), "[$-en-US]mm-dd-yyyy-hh-mm-ss-fff")
}
)


