cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
k_cain
Helper II
Helper II

Enable Date Picker When Toggle is Moved

Hello,

 

I currently have a disabled date picker that need to be enabled once a user moves a toggle.  When the Completed_Toggle field is moved to yes, I would like the Date Request Completed_Input date picker field to return to edit mode.  Does anyone have a solution for this?  Thank you.

k_cain_0-1610058598005.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

If your toggle is named "Completed_Toggle" then the formula would look like this:

If(Completed_Toggle.Value, DisplayMode.Edit, DisplayMode.Disabled)

 

Unless I have a typo I think you can copy/paste the formula above into the DisplayMode property formula bar.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

7 REPLIES 7
Jeff_Thorpe
Super User
Super User

In the DisplayMode property of the Date picker you can a formula like this?

 

If(Toggle1.Value, DisplayMode.Edit, Disabled)

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Jeff, I tried that, but I am still getting an invalid argument type message.

Can you share the a screen shot of the formula with the error?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Jeff,

Below is a screenshot of the error. The red "X" indicated invalid argument type.

k_cain_0-1610129498141.png

 

Jeff_Thorpe
Super User
Super User

It looks like toggle1 may not be the name of the toggle control. Also since the toggle returns true or false you don't need the "= true". Now this part won't cause an error, so take a look at the toggle and use that control name.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

The name of the toggle is Completed_Toggle, and the TrueText of the toggle is "Yes".  I also tried this formula, but it didn't work either:

k_cain_0-1610132086984.png

 

Jeff_Thorpe
Super User
Super User

If your toggle is named "Completed_Toggle" then the formula would look like this:

If(Completed_Toggle.Value, DisplayMode.Edit, DisplayMode.Disabled)

 

Unless I have a typo I think you can copy/paste the formula above into the DisplayMode property formula bar.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,557)