cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Yoursnani
Helper IV
Helper IV

Need to pull Data only status "active"

Hi 

 

I am customizing share point list . and I am pulling different list data in single drop down . everything OK but I need only status = active data only need to pull . how can I do. Please find my expression 

Screenshot_2021_0511_203508.png

   Thank you 

1 ACCEPTED SOLUTION

Accepted Solutions

@Yoursnani ,

As I mentioned, this function does not always work when you try to put different data sources in a drop-down. You will have to run this somewhere before you need the data 

If(
   DataCard51.Value = "Gas",
   ClearCollect(
      colElements,
      Filter(
         Project WBS Elements',
         Status="Active"
      ).'Active WBS Elements'
   ),
   ClearCollect(
      colElements,
      Filter(
         'Project WBS Elements - Diesel',
         Status="Active"
   ).'Active WBS Elements'
)

and then your dropdown Items will be colElements .

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
WarrenBelz
Super User III
Super User III

Hi @Yoursnani ,

Are these two different lists you are using here or are the fields a complex field type of some description?

If(
   DataCard51.Value = "Gas",
   'Project WBS Elements'.'Active WBS Elements',
   'Project WBS Elements - Diesel'.'Active WBS Elements'
)

Also I assume the field name Status is part of the list/s?

Hi @WarrenBelz 

 

Yes both are different list . and different fields but I just made same name column's. But I have status named column's its hold active and inactive . I want active only 

 

Hi @Yoursnani ,

Conditional Items in drop-downs are problematic at times - try this

With(
   {
      wList:
      If(
         DataCard51.Value = "Gas",
         Filter(
            'Project WBS Elements',
            Status="Active"
         ),
         Filter(
            'Project WBS Elements - Diesel',
            Status="Active"
         )
      )
   },
   wList.'Active WBS Elements'
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

@WarrenBelz 

It's not work . getting error "logical test to evaluate for each row. Only the rows that pass this test will included in the results of filter)

@Yoursnani ,

As I mentioned, this function does not always work when you try to put different data sources in a drop-down. You will have to run this somewhere before you need the data 

If(
   DataCard51.Value = "Gas",
   ClearCollect(
      colElements,
      Filter(
         Project WBS Elements',
         Status="Active"
      ).'Active WBS Elements'
   ),
   ClearCollect(
      colElements,
      Filter(
         'Project WBS Elements - Diesel',
         Status="Active"
   ).'Active WBS Elements'
)

and then your dropdown Items will be colElements .

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,203)