cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnGuitar
Frequent Visitor

Filter SharePoint list using flows through Power Apps

Hi!

I am trying to use Flow to filter a SharePoint list according to what is selected in a Power Apps list box.

This is what I have so far :

JohnGuitar_0-1600965500971.png

JohnGuitar_1-1600965533044.png

JohnGuitar_3-1600965610001.pngJohnGuitar_4-1600965689423.png

JohnGuitar_5-1600965739234.png

This is the Schema for the Response step :

 

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "ID": {
        "type": "integer"
      },
      "Vendor": {
        "type": "string"
      },
      "Service": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "Id": {
              "type": "integer"
            },
            "Value": {
              "type": "string"
            },
            "@odata.type": {
              "type": "string"
            }
          },
          "required": [
            "@odata.type",
            "Id",
            "Value"
          ]
        }
      },
      "Region Indicator": {
        "type": "string"
      }
    },
    "required": [
      "ID",
      "Vendor",
      "Service",
      "Region Indicator"
    ]
  }
}

 

When I check the Run History I get the desired output (filtered values from my SharePoint list in a JSON format) in the

 

 Apply to each

 

part of my Flow but I can't manage to put it together so I can read these filtered values in my Gallery in Power Apps. This is the line for my button : 

 

ClearCollect(colQuery2,'PowerApp->Initializevariable'.Run(JSON(ListBox1.SelectedItems.Value,JSONFormat.IndentFour)))

 

The Gallery has the Items property set to the above collection.

The flow is working without error but no value from the Response step is showing in the Gallery.

I can only see a single True value.

I am losing my mind over this so any help is much appreciated!!

Thank you very much for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
JohnGuitar
Frequent Visitor

Ok I managed to do it. This flow should allow the user to perform a multi filter on a multi select choice SharePoint List column from Power Apps.

JohnGuitar_0-1601285817574.png

Here are the details for the last steps (previous steps remain the same as posted before and get items sites address has been removed). All the Schema are generated with a copy and paste from previous steps' body outputs :

JohnGuitar_2-1601285941814.png

JohnGuitar_3-1601285988009.png

I actually had a weird bug with the displaying of the Expression window here I had to dezoom my browser to make it visible.

JohnGuitar_4-1601286090915.png

Here is the line in the On select property of my button in Power Apps :

ClearCollect(colQuery,'PowerApp->Initializevariable'.Run(JSON(ListBox1.SelectedItems.Value,JSONFormat.IndentFour)))

My gallery items property is set to 

colQuery

I couldn't find this kind of multi choice multi filter elsewhere so I hope it helps somebody!

 

 

 

 

 

View solution in original post

4 REPLIES 4
Jcook
Super User
Super User

Hello @JohnGuitar 

 

You're using the wrong request action. You need to use this one:

Jcook_0-1600979049754.png

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





JohnGuitar
Frequent Visitor

Hi!

Thank you for your answer. I can now read the string containing the info in my Power Apps but I am unsure on how to format it to get the information contained in it displayed in my gallery. I would guess some sort of JSON formatting? Do you have an idea? Thank you very much for your help!

Hi @JohnGuitar 

 

You will need to parse the JSON before sending it to Power Apps.

You can use the Parse JSON action inside Flow.

 

It looks like Parsing JSON is not available inside Power Apps. But you could vote for this here:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Parse-JSON-in-PowerApps/idi-p/359563

 

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





JohnGuitar
Frequent Visitor

Ok I managed to do it. This flow should allow the user to perform a multi filter on a multi select choice SharePoint List column from Power Apps.

JohnGuitar_0-1601285817574.png

Here are the details for the last steps (previous steps remain the same as posted before and get items sites address has been removed). All the Schema are generated with a copy and paste from previous steps' body outputs :

JohnGuitar_2-1601285941814.png

JohnGuitar_3-1601285988009.png

I actually had a weird bug with the displaying of the Expression window here I had to dezoom my browser to make it visible.

JohnGuitar_4-1601286090915.png

Here is the line in the On select property of my button in Power Apps :

ClearCollect(colQuery,'PowerApp->Initializevariable'.Run(JSON(ListBox1.SelectedItems.Value,JSONFormat.IndentFour)))

My gallery items property is set to 

colQuery

I couldn't find this kind of multi choice multi filter elsewhere so I hope it helps somebody!

 

 

 

 

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,253)