cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pabitra
Level: Powered On

Building a package finder by selecting relevant Tests

There are several health packages which consists of 20-25 tests each arranged in a table.

Each package has some tests which are common to another package.

 

I need to build an app where there is an combo box to select multiple tests and another list/label to show me the relevant packages which contain the packages which consists of all tests( AND combination of tests)

 

Preliminary build up-

 

1.  combo box to search and input tests-

Sort(Distinct(Table1,Tests),Result)

 

2.Combo box/items/label which gives me a result of packages which consists all the tests

Distinct(Filter(Table1,Tests in ComboBox1.SelectedItems.Result),Package)

 

I have attached a file below to work.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Building a package finder by selecting relevant Tests

Hi @pabitra ,

Do you want to display the packages within the Lable based on the selected tests using AND combination?

 

Based on the needs that you mentioned, I think the GroupBy function could achieve your needs. Please consider modify the formula as below:

Concat(
       Filter(
               GroupBy(
                       Filter(Table1, Test in ComboBox1.SelectedItems.Result),
                       "Package",
                       "GroupData"
               ),
               CountRows(GroupData) = CountRows(ComboBox1.SelectedItems)
       ),
       Package & ";"
)

 

Please consider take a try with above formula, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Building a package finder by selecting relevant Tests

Hi @pabitra ,

Could you please share a bit more about your scenario?

Do you want to display the related packages within a Label based on the selected tests within the ComboBox?

 

Based on the formula you provided, I think you are in right direction. I have made a test on my side, please consider take a try with the following workaround:

1. Set the Items property of the ComboBox to following:

Sort(Distinct(Table1,Test),Result)   // Type Test rather than Tests

or

Sort(Distinct(Table1, Test).Result, Result)

 

Add a Label within your app, set the Text property to following:

Concat(
       Distinct(Filter(Table1, Test in ComboBox1.SelectedItems.Result),Package),
       Result & ";"
)

then these related packages would be shown within above Label.

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
pabitra
Level: Powered On

Re: Building a package finder by selecting relevant Tests

Hi @v-xida-msft ,

 

As mentioned in the question, the packages should be AND combination of tests( not OR which is shown in label)

 

If I select 5 tests in combo box, label should show me packages which contain all the selected tests in combo box (not the packages which contain one or many from combo box, OR combination)

 

Hope, I made it clear.

 

When I select test1, test 34 and test 50 in combo box,

 

Label gives me -

package02-02;package02-03;package01;package02-04;

 

But, it should give package 01 and package 02-03

 

The combination is shown below.

PackageTest
package02-03test 1
package01test 1
package02-04test 1
  
package02-02test 50
package02-03test 50
package01test 50
package02-04test 50
  
package02-03test 34
package01test 34
Community Support Team
Community Support Team

Re: Building a package finder by selecting relevant Tests

Hi @pabitra ,

Do you want to display the packages within the Lable based on the selected tests using AND combination?

 

Based on the needs that you mentioned, I think the GroupBy function could achieve your needs. Please consider modify the formula as below:

Concat(
       Filter(
               GroupBy(
                       Filter(Table1, Test in ComboBox1.SelectedItems.Result),
                       "Package",
                       "GroupData"
               ),
               CountRows(GroupData) = CountRows(ComboBox1.SelectedItems)
       ),
       Package & ";"
)

 

Please consider take a try with above formula, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

pabitra
Level: Powered On

Re: Building a package finder by selecting relevant Tests

Hi @v-xida-msft ,

 

Thank you very much.

It solved my purpose.

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,710)