I have been through 4 or 5 'answered' questions on this topic and none of them work. They all return a giant string that 'cannot be converted to a number'.
Here is my code for my on select to submit a form as well as add the calendar even:
Office365Outlook.V4CalendarPostItem(
"** this is where my giant string for table id goes. this part works fine **",
DataCardValue2.Text & " follow up",
Text(
DateTimeValue(
DateValue1.SelectedDate & " " & TimeValue(
Concatenate(
HourValue1.Selected.Value,
":",
MinuteValue1.Selected.Value
)
)
)
),
Text(
DateTimeValue(
DateValue2.SelectedDate & " " & TimeValue(
Concatenate(
HourValue2.Selected.Value,
":",
MinuteValue2.Selected.Value
)
)
)
),
"(UTC-06:00) Central Time (US & Canada)"
);
Set(
varCalEntryID,
Last(
Sort(
Office365Outlook.V4CalendarGetItems(
LookUp(
Office365Outlook.CalendarGetTablesV2().value,
name = "CRM"
).id
).value,
createdDateTime
)
).id
);
SubmitForm(Form1);
ResetForm(Form1)
I am trying to get the set variable to be set to the id of the event that was created and not the value of the calendar. I have tried many ways to do this with no luck at all. This does submit the form and it also submits the item to outlook. What I am trying to do is sneak the event id into a card on the form to be saved as CalendarEventID so that it can be used to edit/delete the calendar even from the app at some point in the future. (similar to Patch(List,Defaults(List),.....) to get the ID of the item that was just patched.
TYIA!