to enable users to group dimension values into newly defined groups in order to perform analytics on this groups, I created this test application.
hope it might be of any use
Suppose there is a "number" field which we want to group into different categories.
We add an input box bound to the variable vGroupName,
a Listbox "groupName" to select the different groups of numbers,
a table that shows what numbers belong to which group,
two charts that visualize the numbers and sums of the numbers by group
and a magic "new group of numbers" button that calls this vbs macro:
ActiveDocument.DynamicUpdateCommand("DELETE FROM tabGroups WHERE groupName = '$(vGroupName)'")
for i = 1 to ActiveDocument.Evaluate("=getSelectedCount(number)")
InsertValue = ActiveDocument.Evaluate("=subfield(getFieldSelections(number, ';'), ';' ,"&i&")")
ActiveDocument.DynamicUpdateCommand("INSERT INTO tabGroups (groupName, number) VALUES ($(vGroupName), "&InsertValue&")")
This macro populates the tabGroups table with a group name and the selected numbers.
We initiate the application using e.g. this script:
RowNo() as number
'one' as groupName,
1 as number
The result would look like this:
You then could select some numbers, enter a group name in the input box and press the "new group of numbers" button, which creates a new group consisting of your selected numbers and named as you entered in the input box.
This solution only works, if you can enable the dynamic update feature
on document as well as on server level and might be limited to the IE plugin due to the AJAX/macro issue.