I need to filter a dataverse table columns based on value from two Input Text Boxes TextInput1_4 & TextInput1_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
))
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
))
User | Count |
---|---|
259 | |
111 | |
97 | |
48 | |
41 |