Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Storing Variable - GetFieldSelection?

Hello,

I have Department, and a list of trucks (Units) within that department.

I'm trying to store the list of trucks in a variable when the user selects that department. ie) select Department 'A', the variable will hold 'truck1,truck2,truck3' and so on.

Currently, I am using =GetFieldSelections (Units, ' , ', 30). However, if the user selects Department 'A' it does group the right truck, but since there are no trucks actually selected, nothing is being stored. I have to individually select the trucks for it to work.

I'm obviously not using the right command to do this 😄 but I couldn't find anything in the helpfile to do what I desire.

Thus is there a way to store the list of Units in a variable, based on the Department selection?

Thanks in advance.

13 Replies
Not applicable
Author

Instead of continually editing my post, I'll make a new one. Smile

I think what is happening is your vUnit_Array value is being evaluated as an expression. i.e. 72960-120 = 72840. Since none of your UNIT_VALs are 72840, you are getting nothing.

The expression seems to allow quotes around the dollar sign expansion. Try this:

=Sum({$<UNIT_NUM={'$(=subfield(vUNIT_ARRAY,',',1))'},PM={'Y'}>}TOT_LABOR)/Production


Not applicable
Author

Miller (aka number one),

thanks a lot. You must of passed Star Fleet Academy no problem.

Not applicable
Author

Miller (aka number one),

thanks a lot. You must of passed Star Fleet Academy no problem.

Not applicable
Author

Nope, I flunked out for spending too much time on the Internet! Wink