Filter Gallery based on lookup field (Combo Box) on EditForm - CloudFronts

Filter Gallery based on lookup field (Combo Box) on EditForm

Introduction:

In this blog, we will learn how to filter Gallery based on Combo Box which is on different form.

 

Use Case:

We have a requirement where there is a lookup field (Price List) on the Editform (Data Source: Quote Project Price List). When there is data in the lookup field the Gallery (Data Source: Role Price) should be filtered.

 

Steps:

1. We have an Screen which is divided into two parts:(Edit Form + Gallery)

         a. Quote Project Price List Edit Form.

         b. Gallery with Role Price data source.

2. Add field into the Editable Grid (Gallery).

3. The Lookup Field on the EditForm is PRICE LIST on which the gallery is suppose to be filtered.

4. To filter the Gallery set the Items property of the Gallery to the following formula,

Item property:

Set Gallery.Item = Filter('Gallery Data Source', 'GalleryFieldName'.Name = 'Form Lookup Field Name(Combo Box)'.Selected.Name)

For eg: GalleryRolePrice.Item=Filter('Role Prices', 'Price List'.Name=PriceListLookup.Selected.Name)

5. Output of the screen, The Gallery is not visible as the Lookup Field (Price List) is not selected.

6. After selecting the Lookup Field (Price List), the gallery is visible and also filtered on the basis of the selected field.

7. In this way the Gallery will get Filtered on the basis of the Lookup field on the EditForm.


Share Story :

Secured By miniOrange