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

Notifications

Announcements

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

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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard