Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

GetFieldSelections() - Transfer the selection from one column to another with a button

GetFieldSelections() - Transfer the selection from one column to another with a button

I'm trying to transfer the selection from one column to another with a button (when I can not link them directly in the script), using the GetFieldSelections() function.

However, I've found problems because in the selection appears arguments instead of data (apparently it uses the current selections of data).

TAB_NAME:

LOAD * INLINE [

    NAME, ID

    JOSE DA SILVA, 1

    ALVARO CABRAL, 2

    MARIO SERGIO, 3

    RODRIGO ALVES, 4

    EDUARDO CUNHA, 5

    CHICO BUARQUE, 6

    EMILIA BONECA, 7

    SACI PERERE, 8

    JUCA KIFURI, 9

    JAMIL EUMANOITE, 10

    JACA PODRE, 11

];

TAB_ALIAS:

LOAD * INLINE [

    ALIAS, ID2

    JANAINA CORDEIRO, 1

    JUCELIA SILVA, 2

    NILZA APARECIDA, 3

    AMARAL DO PALMEIRAS, 4

    JULIO CESAR, 5

    JANIO QUADROS, 6

    EMILIA BONECA, 7

    SACI PERERE, 8

    ALVARO CABRAL, 9

    EDUARDO CUNHA, 10

    MARIO SERGIO, 11

    RODRIGO ALVES, 12

    JOSE DA SILVA, 13

    CHICO BUARQUE, 14

];

When selecting some records NAME, and click the button, the values are transferred to ALIAS, as desired, using the GetFieldSelections() function.

But, when selecting many or all records, the GetFieldSelections() function returns "ALL" and nothing is useful to select ALIAS.

When selecting 8 records NAME, NOT appears and the selection by GetFieldSelections () for the ALIAS is what you do not want.

So, does anyone know another way to get exactly the list of selected data in a particular field to apply on another field?

Thanks in advance!

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this in Field Selection Search String.

='("'&Concat(NAME,'"|"')&'")'

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this in Field Selection Search String.

='("'&Concat(NAME,'"|"')&'")'

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jcampbell474
Creator III
Creator III

You can try: Document Properties > Triggers > Field Event Triggers > Select the initial field in Field Event Triggers, then On Select and OnChange > Action Type: Selection > Action: Select in Field.

I've used this feature to link one selection at a time.  Not sure if it will work with >1 selections...

Not applicable
Author

Excellent!

Thanks!

Not applicable
Author

I was looking for a user decision way.

I think a trigger will not apply in this case.

By the way, Kaushik Solanki gave me a Concat() method that work's fine!

Thank's anyway.