Filter List(Entity List) in PowerApps Portal (PART 2)

In Previous blog we saw how to filter list using Text filter,Attribute Filter Set and Lookup Set filter.

In this blog, we will see how to work with Range Filter Set, Dynamic Pick-list Set, Dynamic Lookup Set filter, and Fetch XML filter.

Range Filter Set

It is similar to the Attribute Filter set the only difference is we can add two conditions in option instead of one.

Filter the list by using checkboxes/Radio button/drop-down list, each of which tries to match its condition against a specified attribute of the given table.

  1. Click on Range Filter Set to add this filter.
  2. Enter below details:
    • Attribute: Select the attribute by which you want to filter.
    • Selection Mode: Select from Checkboxes/Radio Buttons/Drop-down List based on your requirement
    • Display Name: Enter the display name which will be displayed in the PowerApps portal

NOTE: Only attributes with the type String, Whole Number, Decimal Number, Floating Point Number, Currency and DateTime are allowed.

  1. In Options add your condition.
    • Using these conditions user can filter the records in PowerApps Portal.

Example:

I have the Active Days column of type whole number in Case Table. It stores the number of days since the case was created.

  • We will use the Range Filter Set to provide various filtering options like filter cases whose Active Days are less than 5 or greater than 50.
  • Select the “Active Days” column in Attribute, select selection mode.
  • Add Options(Filtering condition)
    • Select Operator1, enter the Value1 to compare, Select Operator2 enter the Value2 to compare, and finally enter the Display Name.

In Portal:

Dynamic Picklist set

Filter the list by using the selected option set(choice) column value.  

  1. Click on Dynamic Picklist Set to add this filter.
  2. Enter below details:
    • Attribute: Select the picklist by which you want to filter.
    • Selection Mode: Select from Checkboxes/Radio Buttons/Drop-down List based on your requirement
    • Display Name: Enter the display name which will be displayed in the PowerApps portal

In Portal:

Dynamic Lookup set

Specify the relationship on which to filter, and a list of options will be generated based on the specified view of related tables.

In the Lookup set filter we have to provide records by which users can filter but in Dynamic Lookup set filter records are generated automatically based on our selection and permission.

  • Relationship: Select the related table by which you want to filter.
  • Selection Mode: Select from Checkboxes/Radio Buttons/Drop-down List based on your requirement
  • View: The view to use as a source for the dynamic list of tables to filter by.
  • Label Column: It renders the columns from the selected view select the column whose value will be displayed in the PowerApps portal.
  • Filter Lookup On Relationship: Specifies a relationship between the table specified by the Relationship field and the signed-in user. If the table specified by the Relationship field also has a relationship to a contact, you can narrow the list of filter options to those related to the signed-in user.
  • Display Name: Enter the display name which will be displayed in the PowerApps portal

Example:

In Portal:

NOTE: user should have appropriate table permission of related record to filter using Dynamic Lookup Set.

For my example, I am filtering cases based on selected contact then I should have permission for contact records as well.

FetchXML filter

We can create our own custom filter using FetchXML Filter.

For Example:

   <filter type="and" adx:uiname="Filter">
      <condition attribute="caseorigincode" operator="eq" value="3" uiname="Origin=Web"/>
      <condition attribute="prioritycode" operator="eq" value="1" uiname="Priority=High" />
      <condition attribute="crff1_activedays" operator="gt" value="100" uiname="Active Days>100" />
    </filter>

In Portal:

Leave a Reply

Your email address will not be published. Required fields are marked *