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 / Default Record on a Di...
Power Apps
Unanswered

Default Record on a Distinct Dropdown in Edit Form

(0) ShareShare
ReportReport
Posted on by 37

I have a distinct drop down in an edit form.  Item=Distinct('[dbo].[AttyTable]',AttyInitials&"     "&Assignments)

 

However it defaults to the first entry when I attempt to edit the form.  How do I get the default to show the initial record selected?

 

For example when a person selects the pull down for a new entry, they see the Atty Initials and their assignment.  It inputs the atty ID into the table when submitted (the AttyID is a foreign key that links to an attorney table).  When I go to edit the record it defaults to the first entry on the dropdown and if I don't correct it, it saves as the first entry.

Categories:
  • hpkeong Profile Picture
    2,944 on at

    Hi

     

    Dropdown.Items = Distinct(Table, FieldTitle) is Correct.

    In order to SHOW the selected field for editing, the Dropdown.Defaults must be set to the selected field.

     

    Example:

    1. Same Screen

    When you select the items (say in a gallery), select the first item (arrow, or button, etc.), example, teh arrow icon

    Icon.OnSelect = UpdateContext({ContextVariable: ThisItem}), Context Variable (CV) can be any word.

    Then, bind DropDown,Defaults =  CV.FieldTitle (say CV.Department)

     

    2.. Navigate to another screen.

     

    The same apply as above, except when you nagivate to another screen, instead of using UpdateContext, please use

    Navigate(NextScreen, TransitionMode, {ContextVariable: Thisitem})

     

    Hope this helps.

    Thanks and have a nice day.

  • diannottismh Profile Picture
    37 on at

    This isn't working.  The dropdown with the distinct entry is on a datacard for an EditForm. When I save the initial entry, the record is saved.  But when I go back to edit the record, it defaults to the top entry on the distinct drop down.  I need the default to display the distinct record I selected initially when I go back to the edit form.  

     

    I realized I need to add additional information...

     

    The dropdown updates the data card through a text field on the datacard that has the following default setting

     

    defaultl=LookUp('[dbo].[AttyTable]', Dropdown3_1.Selected.Result=AttyInitials&"     "&Assignments).AttyID 

     

     

     

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 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard