how to make validation on drop down of start and end time using power app

Mohammad Qasim 576 Reputation points
2021-07-05T22:33:23.55+00:00

Greetings,

Using power app, showing time like start time and end time in drop down.

Solution required: I want to apply validation ,so

1) end time should be greater than start time.
2) Start time and end time should not be equal

How can apply these validation on power app using drop down list

Image is attached for refence

111981-whatsapp-image-2021-07-06-at-31406-am-1.jpeg
111907-whatsapp-image-2021-07-06-at-31406-am.jpeg
Thanks

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,598 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 41,771 Reputation points Microsoft Vendor
    2021-07-06T08:22:10.283+00:00

    @Mohammad Qasim

    Per my test, setting validation on start time and end time dropdown fields by using Power Apps is not available.

    As a workaround, you could use list validation in the list settings.

    List validation: =IF([start time]<[end time],TRUE,FALSE)
    112060-1.png
    Result:
    112123-2.png


    Update:

    1. Create start time and end time dropdown fields in the list.
      112991-1.png
      112948-2.png
    2. Go to List settings -> Validation settings -> List validation: =IF([start time]<[end time],TRUE,FALSE)
      112949-3.png
    3. If the start time is greater than the end time, error message will show in the form and you cannot submit the form.
      113001-4.png

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.