cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nchandran
Helper V
Helper V

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

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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,537)