Aggregate - Autocomplete in Text Widget

216 views
Skip to first unread message

ffo...@br.fujitsu.com

unread,
Aug 17, 2016, 1:28:02 PM8/17/16
to Fujitsu RunMyProcess Developer Community
Hi

How do I implement the 'aggregate' of autocomplete settings in Text Widget?

I would like to display all records of a collection without repetition.

As if the query would look like this: "SELECT machine_name FROM collection GROUP BY machine_name.

I tried the options below and all went wrong:

1) {"$group":{"_id":{"machine_name":"$machine_name"},"value": {"machine_name":"$machine_name"}}}

2) {"$group":{"_id":{"machine_name":"$machine_name"}}}

3) {"$group":{"machine_name":"$machine_name"}}

autocomplete.JPG

ffo...@br.fujitsu.com

unread,
Aug 17, 2016, 4:22:17 PM8/17/16
to Fujitsu RunMyProcess Developer Community, ffo...@br.fujitsu.com
Problem solved.
Follow the solution:

[{
"$group" : {
"_id" : {
"MachineName" : "$machine_name"
}
}
},{
"$project" : {
"machine_name" : "$_id.MachineName"
}
}
]

Reply all
Reply to author
Forward
0 new messages