Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

GetFieldSelections not triggering multiple selections as expected

Hi everybody,

I am trying to use the GetFieldSelections with the "Select in Field" Action to Trigger a selection in another Dimension with exactly the same values. (Before you wonder why I am doing this: It is used for a Special Business case where I need to compare two Fact Tables which cannot be linked due to insufficient Key Fields)

Anyways the action is triggering fine when single values are selected in the designated listbox, but as soon as several values are selected (at once or one by one with the ctrl-key Held) nothing happens. Eventhough the GetFieldSelections command is delivering the list of the selected values displayed in a text object.

Has anyone had a similar Situation and a Workaround?

Cheers,

MoMa

1 Solution

Accepted Solutions
sam_grounds
Contributor III
Contributor III

I would try this in the action.

'('&Concat(FieldName,'|')&')'

...rather than GetFieldSelections(). That function will not give you the correct format for transferring into another selection.

What you want to be able to select is something like this

(Value1|Value2|Value3)

...GetFieldSelections() will give you something like this

Value1, Value2, Value3

Hope this helps.

Sam

View solution in original post

6 Replies
sam_grounds
Contributor III
Contributor III

I would try this in the action.

'('&Concat(FieldName,'|')&')'

...rather than GetFieldSelections(). That function will not give you the correct format for transferring into another selection.

What you want to be able to select is something like this

(Value1|Value2|Value3)

...GetFieldSelections() will give you something like this

Value1, Value2, Value3

Hope this helps.

Sam

Anonymous
Not applicable
Author

Awesome, it works. Thanks sam..

I have a further issue with the values containing spaces. They do not get selected. Can solve that with the Trigger command or do I have to remove the spaces from the value strings completely?

antoniotiman
Master III
Master III

Hi Mahdi,

try this

='('&Concat(DISTINCT Chr(34)&FieldName&Chr(34),'|')&')'

Regards,

Antonio

sam_grounds
Contributor III
Contributor III

Hi Mahdi,

No problem at all.

Yes, if they have spaces they need to have double quotes I believe.

It gets a bit messy, but you could use something like this...

Concat("Value With Space"|Value|Value|"Other Value With Space")

So as an expression, if you do this...

'("'&Concat(FieldName,'"|"')&'")'

...it should work.

Anonymous
Not applicable
Author

This works just fine ... I wish I could mark both of your answers as correct 😕

Thanks a lot guys!

antoniotiman
Master III
Master III

No problem.

I'm glad to have helped You.

Regards,

Antonio