Hello,
I'm receiving an error using the ticks function trying to parse a date being returned from a Dynamics 365 record.
I'm trying to update a value in a CRM record using the following expression:
Solved! Go to Solution.
Hi @Vikesh
I see that you are using the recurrence as a trigger and in the formula you put triggerbody and this is where the issue is. The triggerbody here will only have details (if any) from the recurrence and not the dynamics action. You can simply select the date time value from the dynamic selector while using the expression.
And if it is not working that way, use the expression like this:
ticks(items('Apply_to_each')?['xx_dateofbirthdateonly'])
instead of the
ticks(triggerBody()?['xx_dateofbirthdateonly'])
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @Vikesh
Can you please share a screenshot of the entire flow? Also, what trigger are you using in your flow?
I am also trying to understand the use of the ticks function in your flow. If you could share these details, we might better identify the issue and assist you with this.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
The flow is being used to calculate the Age of a person from their DOB.
The flow is scheduled to run once a day.
The list records action is retrieving one record at the moment as intended.
I'm using the following expression to calculate the age:
int(split(string(div(div(sub(ticks(utcNow()),ticks(triggerBody()?['xx_dateofbirthdateonly'])),864000000000),365.25)),'.')[0])
The expression ticks(utcNow()) returns a value as expected.
It's just the expresion ticks(triggerBody()?['xx_dateofbirthdateonly']) that is returning an error when trying to return a value.
EDIT
Within the update record action only the following fileds are filled:
Organization Name: Orgname
Entity Name: Contacts
Record Identifier: Current Item
Age in Years: ticks(triggerBody()?['birthdate'])
Any idea?
Thanks,
Vikesh
Hi @Vikesh
I see that you are using the recurrence as a trigger and in the formula you put triggerbody and this is where the issue is. The triggerbody here will only have details (if any) from the recurrence and not the dynamics action. You can simply select the date time value from the dynamic selector while using the expression.
And if it is not working that way, use the expression like this:
ticks(items('Apply_to_each')?['xx_dateofbirthdateonly'])
instead of the
ticks(triggerBody()?['xx_dateofbirthdateonly'])
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Thanks for your help!
That has solved the problem, I'm still new to flow, figuring it out!
Your answer is a lifesaver.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
41 | |
40 | |
37 | |
34 | |
30 |
User | Count |
---|---|
49 | |
37 | |
35 | |
30 | |
24 |