instedd / mbuilder

Scalable SMS application builder
http://mbuilder.instedd.org/
6 stars 1 forks source link

Aggregate functions #33

Closed waj closed 9 years ago

waj commented 9 years ago

See attachment.

Right now, in this example, if I drag and drop "Reports Quantity" to the send message container, the message will contain the expansion of all the results for the specified query separated by commas.

We need to add aggregate functions to instances of tokens. When clicking a token that could have multiple values, display a dropdown menu that gives the user aggregate options. For now, let's start with "sum of". The default option should be "List of values"

If the user clicks on the "sum of" option in the dropdown menu, the token transforms to "sum of reports quantity". Clicking again on "list of values", returns the token to the previous text.

Aggregate functions operate only on each particular instance of the token.


waj commented 9 years ago

The "clicking" conflicts with clicking a token to set a literal value to it.

I know in the "literal values" ticket it said "when you click on a token inside the table", but since all tokens are bound to the same value it seems natural that clicking any instance of the token does the same thing.

How do we solve this?


waj commented 9 years ago

For now we'll do it with a right click. Later we can change this if the user is on a tablet or phone.