cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How to set time if a dropdown value changes

Hi,

 

I'm trying to make a ticketing system. 

When a status value set to 'closed' or 'solved' I should get the time and set it to ClosedDate.

Would someone help, please?

time.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How to set time if a dropdown value changes

Hi @Setayesh2 

In the DefaultDate of DataCardValue3

If(
   DataCardValue14.Selected.Value="Closed" ||
   DataCardValue14.Selected.Value="Solved",
   Now()
),
Parent.Default)

In the OnChange of DataCardValue14

Reset(DataCardValue14)

 

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: How to set time if a dropdown value changes

Hi @Setayesh2 

In the DefaultDate of DataCardValue3

If(
   DataCardValue14.Selected.Value="Closed" ||
   DataCardValue14.Selected.Value="Solved",
   Now()
),
Parent.Default)

In the OnChange of DataCardValue14

Reset(DataCardValue14)

 

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Highlighted
Advocate III
Advocate III

Re: How to set time if a dropdown value changes

Hi @Setayesh2 ,

In order to do this you will need to control DataCardValue3 with a variable. (I am assuming from your code that DataCardValue3 links with your time column).

All you need to do is set the default value for DataCardValue3 to be a variable name. Then, where you currently have your code collecting the current time, you can tell it to update that value by using the Set() or UpdateContext({}) command depending on whether you use a global or local variable.

 

Let me know if you need help with this and I will provide screenshots of what I mean.

 

Kind regards,
Matt

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,268)