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 / unabel to set / pass d...
Power Apps
Unanswered

unabel to set / pass default selected items ( Time AM/PM) for Modern dropdown

(0) ShareShare
ReportReport
Posted on by 2

Hi,

I am using modern drop down to display time part (AM /PM), These are the items in my drop-down.

 

 

AddColumns(
 Sequence(
 19,
 8,
 0.5
 ) As myNum,
 "MyTime",
 Text(
 DateAdd(
 TimeValue("12:00 AM"),
 myNum.Value * 60,
 TimeUnit.Minutes
 ),
 DateTimeFormat.ShortTime
 )
)

 

 

​The default selected Items are {Value: Time Value(varItemSelected.'Start Date')}

I want the drop-down to load the selected item's time value, but it is blank on the Edit form.

Thanks

Azra

 

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @azra-ansari,

    Could you please tell me what is varItemSelected?

     

    Actually, the SefaultSelectedItems property should be combined with the data source directly, you need to retrieve the time value from the data source based on how you set the Items property of the drop down.

  • azra-ansari Profile Picture
    2 on at

    varItemSelected is the selected item from the gallery I am passing from another screen. It holds "Item", which has Title, Start Date /Time , End Date/Time etc.
    This is the DataCard Update Action for that form:

    StartDateValue.SelectedDate + TimeValue(ddlStartHours.Selected.MyTime), where StartDateValue is datepicker control and ddlStartHours is my dropdown (items generate by sequence to show 8-5 AM/PM)



  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @azra-ansari,

    Do you save the date time value into a single-line-of text column?

     

    If so, I think you need to do a lot of work to convert the text into time value then use it to retrieve the corresponding AM/PM value in your dropdown control.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard