public async Task SelectWorksheet(IDialogContext context, LuisResult result)
        {
            // Telemetry
            TelemetryHelper.TrackDialog(context, result, "Worksheets", "SelectWorksheet");

            string workbookId = String.Empty;

            context.UserData.TryGetValue <string>("WorkbookId", out workbookId);

            WorksheetName = LuisHelper.GetNameEntity(result.Entities);

            if (!(String.IsNullOrEmpty(workbookId)))
            {
                if (!(String.IsNullOrEmpty(WorksheetName)))
                {
                    await WorksheetWorker.DoSelectWorksheetAsync(context, WorksheetName);

                    context.Wait(MessageReceived);
                }
                else
                {
                    // Call the SelectWorksheet Form
                    SelectWorksheetForm.Worksheets = await WorksheetWorker.GetWorksheetNamesAsync(context, workbookId);

                    context.Call <SelectWorksheetForm>(
                        new FormDialog <SelectWorksheetForm>(new SelectWorksheetForm(), SelectWorksheetForm.BuildForm, FormOptions.PromptInStart),
                        SelectWorksheet_FormComplete);
                }
            }
            else
            {
                context.Call <bool>(new ConfirmOpenWorkbookDialog(), AfterConfirm_SelectWorksheet);
            }
        }
        private async Task SelectWorksheet_FormComplete(IDialogContext context, IAwaitable <SelectWorksheetForm> result)
        {
            SelectWorksheetForm form = null;

            try
            {
                form = await result;
            }
            catch
            {
            }

            if (form != null)
            {
                // Get access token to see if user is authenticated
                ServicesHelper.AccessToken = await context.GetAccessToken(ConfigurationManager.AppSettings["ActiveDirectory.ResourceId"]);

                // Select worksheet
                await WorksheetWorker.DoSelectWorksheetAsync(context, form.WorksheetName);

                context.Done <bool>(true);
            }
            else
            {
                await context.PostAsync("Okay! I will just sit tight until you tell me what to do");

                context.Done <bool>(false);
            }
        }