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 Apps / Write Time-Picker Valu...
Power Apps
Answered

Write Time-Picker Values to SharePoint-List

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi *,

I have a screen in a PowerApps with selection of a start and end time, divided into hours and minutes:

Bild1.png

These are 4 dropdown boxes with preassigned choices, here as an example a dropdown box for minutes in 15 minute increments:

Bild2.png

Now I want to write all 4 values together in a SharePoint column. For this I set a variable for each dropdown box at OnChange, e.g. Set(varMinStart; Self.Selected) and build a string from the 4 variables, which I then pass to a TextBox, which then writes to the SharePoint list via SubmitForm:

varStdStart.Value & ":" & varMinStart.Value & " - " & varStdEnd.Value & ":" & varMinEnd.Value & " Uhr"

Bild3.png

This works now also so far. But if the user now selects only the hours and no minutes, then the variables for the minutes are not filled and there is now an unsightly output:

Bild4.png

Now I'm looking for a way how I can set the value for the minutes as default to "00" in such a case, so that it looks like this again:

Bild5.png

My second problem with this is how I can prevent a value greater than the end time from being selected as the start time, so like this:

Bild6.png

Does anyone have any ideas about this?

Many thanks in advance.

 

Regards

Herb

 

Categories:
I have the same question (0)
  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Instead of using variable. Insert a text type column in SharePoint:

    Text input field of this column will be hidden. Set it's default to

    DropDown1.Selected.Value & ":" & DropDown2.Selected.Value

     

    another thing:

    Set default of the minute dropdown

    "00"

     

    Insert a label. Set it's text property:

    "End Time Could not be lower than start time"

    Set it's visible property to:

    DropDownEndTime.Selected.Value>DropDownStartTime.Selected.Value

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @zmansuri,

    I have probably thought much too complicated with my four variables.🤔

    This is how it works now !

    Thank you for opening my eyes. 😊

     

    Regards

    Herb

     

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Glad it worked

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard