Filter data table for multiple condition in UiPath - datatable

So I am using UiPath to automate a process by searching a DataTable on a specific column with a range of keywords. I know that we can use the Filter Data Table and add on the keywords that I want but I have about 130 keywords to be matched and it's troublesome to add one by one using the Filter Data Table function.
Is there any way that I can use like creating a list and match the list or something and give the output that matched?

You can use Datatable.Select to filter a datatable with multiple conditions fairly easily.
myDataTable.Select("[Column x] Not in ('value1', 'value2', 'value3')")
Will give you all the DataRows where the field in your datatable called Column X is not value1, value2, or value3

Related

Is there a way to query two indexes and join the result in Opensearch/ElasticSearch (Just like we do in RDBMS)

My requirement is
I have a deeply nested filter condition
Params from filter condition is located in two elastic search indexes
I need to pass the filter condition as query and get results which are joined by a field
The existing way is to use two indexes comma separated and searching but is supports only or - should condition. Reference : https://discuss.elastic.co/t/query-multiple-indexes-but-apply-queries-to-specific-index/127858
I need a way to support to and - must condition also.
Is there a possibility to do that? Thanks in Advance

How to use values from a list aggregated field in a table to a filter in Quicksight?

I have a dashboard in Quick-sight where a table is being used which contains a field that has values list aggregated.(Please refer the attached image).
I need to create a filter in a dashboard that will have a dropdown with distinct values from the list aggregated values so that if i select/check a particular value from a dropdown then it should filter out the list aggregated record by matching the string i selected in a drop down.
I tried to use the split function to get the distinct values from the list aggregated values from the field. However, the filter did not work as i expected.
Please suggest possible solution. Will appreciate any suggestions.

How to add distinct to filter expression in Defined Selector in Openbravo?

The filter expression which I am using now is,
"e.contract= '" +OB.getParameters().get('subscriptionId') + "'"
Here, e is the current table which is populated in 'Table' , and contract is the column there (In the POJO class) which stores the value of subscriptionId.
The issue is the attribute in the next level Defined Selector Field ,which I display a certain column exColumn has many rows [selected from the above expression] with same value.
Here , I intend to add a distinct in the filter expression or in the HQL [which doesn't seem to be filtering at run time] or in the Defined Selector Field, so that we don't display repeated values.
You cannot add distinct in a Filter Expression, which is used to restrict the results of the datasource.
You have 2 different options:
Define the selector based on a Custom Query and write there the HQL to retrieve the values. In this query you can have the distinct. As example you can check Business Partner not filtered by default by customer/vendor selector which is implemented in this way.
Base your selector on a Table from a view:
Create a database view with the base SQL query you need including the distinct.
Register it as an Application Dictionary Table
Base your selector on it

many to many relationship in mongodb

I'm writing a small torrent indexer in Ruby (here) and would love to support MongoDB as an option for the database. Currently, I have the database set up with a many-to-many relationship between tags and torrents.
How would I format a query that gets all the torrent_ids from a map table that match to all the tags in a given list?
I did this in SQL like this:
select torrent_id, count(*) num from tagmap where tag_id in (tag1, tag2, tag3, tag4) group by torrent_id having num = 4"
EDIT: I am right now working only with the collection with torrent_id and tag_id. That's all it has in there. So I'm mapping ids to ids and naught more.
It's better to create a collection to create the mapping consisting tag_id's and torrent_id's. Whenever you add a torrent, also add the torrents tags to the torrenttags collection. Index should be on tag_id.
You can use the following query syntax to get a list of torrents matching more than one tag.
db.tagmap.find({tag_id:{$in: ['tag1','tag2','tag3','tag4']}});
For Aggregation (group by, count) you need to use MapReduce

SOLR query boost

I'm querying Solr like this:
http://XXX.xx.xx:xxx/solr/select?q=name:(pizza)&fq=locationid:6050 OR _query_:"{!bbox}"&sfield=location&pt=34.0211224, -118.39646&d=8
I am searching for records on name column and the record must fall on 8 kms Boundry OR locationid column value 6050.
Now I want to boost records which match locationid column value 6050.
If you use the locationid:6050 filter within the filter query parameter it won't influence the score. You should first of all move your filter inside the q parameter. Then you can use the edismax or dismax query parser and play around with the weight of your filter like this: locationid:6050^2. Have a look here.

Resources