cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nchandran
Post Patron
Post Patron

Problem with Two dropdowns to filter gallery

I would like to have two dropdown list to filter the gallery based on Order No and PartNo but im getting syntax errors. Tried two different syntax in Distinct(Filter(ConsumableWithdraw, MasterID=GalleryCRWelderInfo.Selected.ID),Order=DropdownOrdNo.Selected,PartNo=DropdownPartNo.Selected) or tried Distinct(Filter(ConsumableWithdraw, OrderNo=DropdownOrdNo.Selected, PartNo=DropdownPartNo.Selected), MasterID=GalleryCRWelderInfo.Selected.ID) OrderNo and PartNo are columns from the sharepoint list called ConsumableWithdraw. Dropdown to search Order No is DropdownOrdNo & Dropdown to search Part No is DropdownPartNo.

MasterID gets the information from the ID in the primary Gallery GalleryCRWelderInfo. Screenshot below.

 

 

filtering error.jpg

 

 

10 REPLIES 10
v-bofeng-msft
Community Support
Community Support

Hi @nchandran :

Plese try this fromula:

Distinct(
   Filter(
      ConsumableWithdraw, 
      MasterID=GalleryCRWelderInfo.Selected.ID,
      Order=DropdownOrdNo.Selected,
      PartNo=DropdownPartNo.Selected
      )
)

Best Regards,

Bof

Hi it doesn't work, still getting the red swiggilies.

Hi @nchandran :

Could you tell me:

What is Order and PartNo's data type?

What is DropdownOrdNo and DropdownPartNo?What are they items property?

Please try:

Distinct(
   Filter(
      ConsumableWithdraw,
      MasterID=GalleryCRWelderInfo.Selected.ID,
      Order=DropdownOrdNo.Selected.ColumnName,
      PartNo=DropdownPartNo.Selected.ColumnName
      )
)

Because of the lack of information, I cannot be sure that my answer is 100% correct.If there is still an error, could you consider providing more details?

Best Regards,

Bof

For  both Dropdown , items is ConsumableWithdraw.

Hi @nchandran :

Please try this formula:

Distinct(
   Filter(
      ConsumableWithdraw, 
      MasterID=GalleryCRWelderInfo.Selected.ID,
      Order=DropdownOrdNo.Selected.Order,
      PartNo=DropdownPartNo.Selected.PartNo
      )
)

Best Regards,

Bof

 

I got this screenshot. Error is still there. Master ID is a lookup column (belongs to secondary sharepoint list) which points taps on ID column belonging to primary sharepoint list.

nchandran_0-1606473868017.png

 

 

Hi @nchandran :

I’m not sure what your reason for using Distinct is, I assume you want to de-duplicate according to Title column.

Please try this formula:

ForALL(
  RenameColumns(Distinct(
     Filter(
        ConsumableWithdraw, 
        MasterID.value=GalleryCRWelderInfo.Selected.ID,
        Order=DropdownOrdNo.Selected.Order,
        PartNo=DropdownPartNo.Selected.PartNo
        ),
      Title
  ),"ID","IDD")
  LookUp(ConsumableWithdraw, ID=IDD)
)

 Best Regards,

Bof

nchandran
Post Patron
Post Patron

Getting this error.

 

nchandran_0-1606711290647.png

 

v-bofeng-msft
Community Support
Community Support

Hi @nchandran :

You don't seem to use the formula I provided.

ForALL(
  RenameColumns(Distinct(
     Filter(
        ConsumableWithdraw, 
        MasterID.value=GalleryCRWelderInfo.Selected.ID,
        Order=DropdownOrdNo.Selected.Order,
        PartNo=DropdownPartNo.Selected.PartNo
        ),
      Title
  ),"ID","IDD")
  LookUp(ConsumableWithdraw, ID=IDD)
)

From the screenshot, the reason for the error is that Distinct uses the wrong syntax.

Distinct( Table, Formula )

I think this link will help you a lot:

Distinct function in Power Apps 

Best Regards,

Bof

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,070)