web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / MAKING THE DURATION OF...
Power Automate
Unanswered

MAKING THE DURATION OF AN EVENT THROUGH A CHOICE COLUMN

(0) ShareShare
ReportReport
Posted on by

I HAVE A CHOICE FIELD WHERE THEY HAVE:

 

- 30 MIN
- 60 MIN
- 90 MIN

 

I WOULD LIKE TO MAKE THE END DATE OF THE EVENT WITH THE SUM OF THE DATE + THE CHOSEN DURATION TIME, WOULD IT HAVE?

Categories:
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Gorilla_8 ,

    You need to be more specific about your scenario. It's your datesource a Sharepoint list ? A dataverse table ? 

    Are involved all items from the datasource or only a specific one ? What is the trigger of the flow ?

  • Gorilla_8 Profile Picture
    on at

    Oh, sorry @gabibalaban 

     

    It's a Sharepoint list, just one item each time.

     

    I just need to convert the value on the choice column to get the '30' or '60 or '90' and add on my 'create event v4' - endtime

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Gorilla_8 ,

    It should be something like:

     

    addMinutes(
     triggerBody()?['Date'],
     int(triggerBody()?['ChoiceColumn/Value']),
     'yyyy-MM-ddTHH:mm:ss'
    )

     

    I supposed that all values (Date -  StartDate and ChoiceColumn - i didn't get its name) are taken from the trigger. So please replace in my formula Date with your event StartDate column and ChoiceColumn with the name of the ChoiceColumn.

     

    Hope it helps !  

     

  • Gorilla_8 Profile Picture
    on at

    @gabibalaban 

     

    Thanks @gabibalaban 

     

    I tried with to convert the choice column, but I got an erro with 'int'

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    please share the error.... and a picture of the action. 

  • Gorilla_8 Profile Picture
    on at

    @gabibalaban 

     

    Here:

    InvalidTemplate. Unable to process template language expressions in action 'Initialize_variable_2' inputs at line '1' and column '27463': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

     

    Gorilla_8_0-1634149165368.png

     

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Gorilla_8 ,

    Well you didn't mention anything about " min" in your choice field. I'll supose that 60 and 90 are also with " min" at the end.

     

     

    addMinutes(
     triggerBody()?['Date'],
     int(replace(triggerBody()?['ChoiceColumn/Value'],' min','')),
     'yyyy-MM-ddTHH:mm:ss'
    )

     

     

     

  • Gorilla_8 Profile Picture
    on at

    @gabibalaban 

     

    I post the 'MIN' on my post, but no problem, didn't work as expected, got an error again

  • Gorilla_8 Profile Picture
    on at

    @gabibalaban 

     

    There is no way to convert the choice column on a int and put the value to add on date?

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Gorilla_8 ,

    This is the way:

    addMinutes(
     triggerBody()?['Date'],
     int(replace(triggerBody()?['ChoiceColumn/Value'],' min','')),
     'yyyy-MM-ddTHH:mm:ss'
    )

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard