How do you supply a date as a record to comply with this connector?? Thanks!
Solved! Go to Solution.
You will need to pass the date/times as a record to that parameter you want.
So, for example, if you are trying to set the StartDateTime, your formula would be like so:
'MicrosoftTo-Do(Business)',CreateToDo("yourToDoSubject",
{StartDateTime:
{DateTime: DateValue,
TimeZone: "UTC"
}
}
)
Your DateValue above should be UTC. You can use a function that returns a datevalue, like DateAdd, DateTimeValue, Now(), Today(), etc. depending on your needs.
But, the important part is that you need to pass a record with those two properties.
I hope that is helpful for you.
You will need to pass the date/times as a record to that parameter you want.
So, for example, if you are trying to set the StartDateTime, your formula would be like so:
'MicrosoftTo-Do(Business)',CreateToDo("yourToDoSubject",
{StartDateTime:
{DateTime: DateValue,
TimeZone: "UTC"
}
}
)
Your DateValue above should be UTC. You can use a function that returns a datevalue, like DateAdd, DateTimeValue, Now(), Today(), etc. depending on your needs.
But, the important part is that you need to pass a record with those two properties.
I hope that is helpful for you.
Thanks @RandyHayes !
Where did you find this information? Reason I ask is I would also like to utilize Body and Categories but see they require a record also...
Yes, some of the connectors have VERY poor documentation on usage.
I find myself looking at the PowerApps Connectors Reference by carlosag often. It's still no where near reference for "here's an example" but it usually provides much more about the parameters and what they are expecting.
If the type of parameter for a function is not basic (string, int, etc), then there is usually reference there for what kind of type it is.
In this case, I:
1) looked at the To-Do connector.
2) Saw that the parameter was a StartDateTime record type
3) looked at that reference and saw that I needed to supply a dateTime property
4) went back to PowerApps and put that in...got error!
5) hovered over error and the error then started to tell me exactly what I needed.
6) recorded this in my "PowerApps" notebook for the future (like this question you had)
So...a bit of trial and error. I went through a few of those a while back and just put them in my notes because I knew I'd see them again.
Messy...Yes!
Thank you for listing that website... I did not find that in previous searches.
I got Body working now onto Categories which is a little confusing.
Categories | array of (string)
| Collection of category names associated with the to-do. |
I can't recall what I did for that one (and don't seem to have a note on it), but I believe it was as simple as - Categories:["Category1", "Category2"]
Can't be 100% on that one though without a test....you're it! 😉
Yep...just tested that. It was correct.
All worked! Thanks for working with me through this! Hopefully this will help other.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
53 | |
41 | |
37 | |
31 |
User | Count |
---|---|
250 | |
75 | |
71 | |
68 | |
65 |