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 / Using Distinct messing...
Power Apps
Answered

Using Distinct messing up downstream details form

(0) ShareShare
ReportReport
Posted on by 155

My Excel table has data similar to the following contrived data:

NameLikes SportsObserverAssigned Person
MikeYesJaneBill
MikeNoBobBill
JoseYesMaryBill

 

I have a form with a gallery where I set the Items property to Filter(Table1, 'Assigned Person', "Bill").  That gives me all of the records above and then I have a subsequent details form that has more columns than the subset I show above and I use Gallery1.Selected.FieldName for labels on that form.  All works fine.  However, I want to only have distinct values on the first form so I change the filter on the first form to Distinct(Filter(Table1, 'Assigned Person', "Bill"), Name).  That gives me only one record for say Mike in the case above (which is what I want).  However, now I cannot use Gallery1.Selected.FieldName in the details form because the first form now has Result.  I don't know how to refer to the individual fields of the table on my details form after using the distinct function.

 

Does this make sense?  Sorry it's so convoluted.

 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Instead of individual Fields with Gallery1.Selected.FieldName, remove these formulas and on the ITEM property of the form, put:

    Gallery1.Selected

     

    If the above doesn't solve the issue, clarify the difference between the 2 forms you mentioned and Also whether the form and the Gallery are on same screen.

     

    If the Gallery1 and the form are not on the same screen, on the Onselect of an icon inside the Gallery1, put;

    Set(Myselection,ThisItem)

     

    Then in the Item property of the form Put;

    Myselection

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • mhenderlight Profile Picture
    155 on at

    To clarify, the details screen (I should have said screen, not form), does not have a Form because using a Form I could not get the layout that I wanted (kept fighting with the layout that forms have) so I had to just put labels all over the screen and hook them up to the Gallery.Selected.FieldName(s).  Therefore, there is no Item property on my details screen that I can hook up to.

     

    Here is a screen shot of my details screen to show why I couldn't use a Form to layout the data:

     

    mhenderlight_0-1612296528094.png

     

  • Verified answer
    eka24 Profile Picture
    20,923 on at

    One Approach is to use a LookUp in the default of the textboxes like:

    LookUp(Datasource,Customer=Gallery1.Selected.Result,Description)

     

    So consider:

    If(Form1.Mode=FormMode.Edit,Parent.Default,
    LookUp(Datasource,Customer=Gallery1.Selected.Result,Description))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • mhenderlight Profile Picture
    155 on at

    Dude!  You saved my bacon.  Thanks a lot!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard