cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
addy2019
Advocate V
Advocate V

Filtering Dataverse table based on delimited values & other strings at once

I need to filter a dataverse table columns based on value from two Input Text Boxes TextInput1_4TextInput1_6 & add to Collection. Each of those boxes can contain more than one search parameter separated by commas. For Ex: DGT98765,TYHR00087,KLIU98752.

 

I have seen similar solution here Comma Separated Value Used in FIlter but it only has one Input control in my case I have two. Here's the current code but it can Filter only one Search Parameter. Kindly advice how to approach this.

ClearCollect(mycollection,Filter(
   'DV_Source',
   TextInput1_4.Text in Account_Id__c ||
   TextInput1_6.Text in 'Name.1' ||
   TextInput1_6.Text in 'Name.2' ||
   TextInput1_6.Text in 'Name.3' ||
   TextInput1_6.Text in Name
))

 

 

2 REPLIES 2
v-yujincui-msft
Community Support
Community Support

Hi @addy2019 ,

 

You can try to store the values entered in the two TextInput Controls into another collection.

1. Select the TextInput Controls and apply the following formula on their On change property as:

Clear(coltext);ForAll(Split(TextInput1_4.Text,","),Collect(coltext,{coltt:Result}));ForAll(Split(TextInput1_4.Text,","),Collect(coltext,{coltt:Result}))

2. Add a Button Control and try to use the formula like this:

Clear(mycollection);ForAll(coltext,Collect(mycollection,Filter('DV_Source',coltt in 'Account_Id__c ')))

 

Best Regards,

Charlie Choi

 

 

Thanks Charlie for the response. Although I already used similar method as below. It's working but as its a matter of searching millions of rows I want to be sure that this is not missing out on any record. For Ex: your code is doing <collection name> in <DV Column Name> while my code is doing this  <DV Column Name> in <collection name> does it work both ways?

ClearCollect(said,Split(TextInput1_4.Text,","));ClearCollect(wcsrch,Split(TextInput1_6.Text,","));ClearCollect(mycollection,Filter(
   'DV_DataSource',
   Account_Id__c in said ||
   'Name.1' in wcsrch ||
   'Name.2' in wcsrch ||
   'Name.3' in wcsrch ||
   Name in wcsrch
))

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,211)